I am not sure about your exact setup but generally server-side prerendering should be thought as a way to populate your state
So you’d want to store relevant state in the database for scenarios where users does a hard refresh/navigation, and then pass it to Recoil to warn your local state
Not sure but maybe what you miss here is a background sync between Recoil and your db? Like on every recoil state change, you asynchronously save relevant items in your db, so if user’s hit refresh you are able to reconstruct a proper state
2 Likes