easy-peasy icon indicating copy to clipboard operation
easy-peasy copied to clipboard

useStoreRehydrated always returning true?

Open GollyJer opened this issue 4 years ago • 0 comments

For some reason useStoreRehydrated returns true even though it isn't.

I'm using

const isRehydrated = useStoreRehydrated();
console.log('isRehydrated', isRehydrated);
if (!isRehydrated) return null;

to protect the App from loading until state is rehydrated.

But this console logs isRehydrated true even on the first run and I can see the App render with empty data and then rerender with rehydrated data a second later.

Not sure what to check next. Thanks for any help!

GollyJer avatar Jun 12 '21 01:06 GollyJer