You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once code has been published some SomeStore.name are possibly duplicated and causes issue on hydrateStores.
Noticed this while creating multiple IStore classes. The app keeps getting stuck on splash screen in Production mode and failing at hydrateStores, and then I tried logging store each store loop iteration under said method and noticed t is being hydrated multiple times hence failing to hydrate one or more stores properply. The same code works fine in dev mode (probably because names aren't minified here).
Am I doing something wrong? Or any configurations I might've missed?
Worked around the issue by hard-coding name instead of using Function.name.
Hey @gerardomaranan! That's quite strange, I've never faced anything similar before. Are you sure that you are giving different names to store classes and changing it also in makePersistable? Because FooClass.name should always return the name of the class and if they are all different, makePersistable should work fine.
Hey @kanzitelli, yup I'm pretty sure I named the store classes differently as it'll throw errors if I do not. I'll try and replicate it on a new project. I'll let you know. Thanks!
Newbie here!
Once code has been published some
SomeStore.name
are possibly duplicated and causes issue onhydrateStores
.Noticed this while creating multiple IStore classes. The app keeps getting stuck on splash screen in Production mode and failing at
hydrateStores
, and then I tried logging store each store loop iteration under said method and noticedt
is being hydrated multiple times hence failing to hydrate one or more stores properply. The same code works fine in dev mode (probably because names aren't minified here).Am I doing something wrong? Or any configurations I might've missed?
Worked around the issue by hard-coding name instead of using
Function.name
.From:
To:
The text was updated successfully, but these errors were encountered: