redux-persist icon indicating copy to clipboard operation
redux-persist copied to clipboard

'onHydratationCompleted' callback functionality

Open sebqq opened this issue 6 years ago • 1 comments

Hello

I would like to ask you if there is any way to use PersistGate component with something like 'onHydratationCompleted' callback? I'm using redux-persist in React Native application and it would be nice if I could let Splash screen visible until the app is loaded - Redux store is retrieved. Splash Screen is native module so in order to hide it I need to use imperative method call.

Right now I can see clearly that It's possible to use loading component's unmount method to run my "onHydratationCompleted" callback but maybe there is some other/better solution that I can't see.

Thank you for any help!

sebqq avatar Aug 15 '19 11:08 sebqq

What about persistStore() callback, or PersistGate's onBeforeLift (even better, because it awaits async code)?

koxu1996 avatar Oct 23 '22 18:10 koxu1996