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
here is how i had to solve it, by not mounting the app until store was hydrate.
importAppfrom'./App';importstorefrom'./Store';//herre is where persist is imported and applied as necessary.import{create}from'mobx-persist';conststoreName='foobar';create()(storeName,store).then(()=>{ReactDOM.render(<Appstore={store}/>,document.getElementById('root'));setTimeout(()=>registerServiceWorker)});
this is dangerous because computed properties don't cause rerenders in mobx. if this is a bug in mobx instead, feel free to notify them.
The text was updated successfully, but these errors were encountered:
r3wt
changed the title
usage with react can cause race conditions
usage with react can cause race conditions with computed properties derived from persisted value
Jan 25, 2018
here is how i had to solve it, by not mounting the app until store was hydrate.
this is dangerous because computed properties don't cause rerenders in mobx. if this is a bug in mobx instead, feel free to notify them.
The text was updated successfully, but these errors were encountered: