Skip to content

Commit

Permalink
Remove unnecessary export to make usage clearer. (vercel#12167)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dashue authored and rokinsky committed Jul 11, 2020
1 parent 3808eb0 commit b38d695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/with-mobx/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b38d695

Please sign in to comment.