Hydration on the Client (With Effect-RX)
Hey folks.
I faced an issue recently with my state not being preserved on page reload. So I tried implementing it with HydrationBoundary from effect-rx package.
I'm probably doing something wrong. Is there a good example of how to handle such cases?
My scenario:
User logs in successfully, then is navigated to a dashboard page, then reloads the page and gets thrown back to login screen... Ideally, the user should be thrown back to login page as he's just logged in..
I check the locally stored state at the app's entry point like this:
As i understand I should dehydrate with smth like this in one of my rx functions?
I faced an issue recently with my state not being preserved on page reload. So I tried implementing it with HydrationBoundary from effect-rx package.
I'm probably doing something wrong. Is there a good example of how to handle such cases?
My scenario:
User logs in successfully, then is navigated to a dashboard page, then reloads the page and gets thrown back to login screen... Ideally, the user should be thrown back to login page as he's just logged in..
I check the locally stored state at the app's entry point like this:
//state.tsAs i understand I should dehydrate with smth like this in one of my rx functions?
