未验证 提交 f3e6545b 编写于 作者: J Johan Nilsson 提交者: GitHub

Remove unnecessary export to make usage clearer. (#12167)

The method initializeStore is only being used locally by useStore.
By having this exported I initially thought the consumer would have to call this as setup globally and then call useStore as well for each consuming component.

Downloading the sample I saw it's only useStore that is being used by the consuming app and this could be made clear by not exporting initializeStore.
上级 f42055cc
......@@ -38,7 +38,7 @@ class Store {
}
}
export function initializeStore(initialData = null) {
function initializeStore(initialData = null) {
const _store = store ?? new Store()
// If your page has Next.js data fetching methods that use a Mobx store, it will
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册