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
Describe the bug
When using the approach shown in this example, where <Class>.name is being used as the name option, the minified bundle is giving warnings. Additionally, the app behaviour is impacted as hydration does not work as expected in some cases and state is lost.
To Reproduce
Steps to reproduce the behavior:
Follow the approach in the example and use <Class>.name as the name for the name option.
Generate a dev build: eas build --platform ios --profile development
Generate a minified bundle: npx expo start --dev-client --minify
Notice the warning in LogBox, and observe potential unexpected app behavior
Expected behavior <Class>.name should be able to be used as a storage name without causing warnings or affecting app behavior.
Warning mobx-persists-store: 'makePersistable' was called with the same storage name "t"
Environment
ios development: warning + behaviour
ios staging build ("developmentClient": false): behaviour only
Possible Solution
using static string values instead, like name: 'CounterStore'
The text was updated successfully, but these errors were encountered:
It has been already happening to some people but never for me though. And the recommendation was to just give static string values as a store name as you suggested.
It would be great if you could create PR for this 👍
@kanzitelli
I'm sorry i can't provide a PR at this time. At least the issue is mentioned here including a solution in case someone is stumbling across this.
Describe the bug
When using the approach shown in this example, where
<Class>.name
is being used as the name option, the minified bundle is giving warnings. Additionally, the app behaviour is impacted as hydration does not work as expected in some cases and state is lost.To Reproduce
Steps to reproduce the behavior:
<Class>.name
as the name for the name option.eas build --platform ios --profile development
npx expo start --dev-client --minify
Expected behavior
<Class>.name
should be able to be used as a storage name without causing warnings or affecting app behavior.Warning
mobx-persists-store: 'makePersistable' was called with the same storage name "t"
Environment
Possible Solution
using static string values instead, like name: 'CounterStore'
The text was updated successfully, but these errors were encountered: