easy-peasy
easy-peasy copied to clipboard
useStoreRehydrated always returning true?
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!