From b38d69589260fcf57e905b250fa0bef952cc57b5 Mon Sep 17 00:00:00 2001 From: Johan Nilsson Date: Fri, 24 Apr 2020 10:31:03 +0100 Subject: [PATCH] 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. --- examples/with-mobx/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-mobx/store.js b/examples/with-mobx/store.js index 5d171ce951d775..dbe98c46feb954 100644 --- a/examples/with-mobx/store.js +++ b/examples/with-mobx/store.js @@ -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