DEV Community

Discussion on: Server Side Rendering(SSR) With "State Pool" React State Manager

Collapse
 
yezyilomo profile image
Yezy Ilomo

I think a fresh store is created in each request, so it wouldn’t be possible for two requests to share a global state, you can try to recreate an example where two requests would return different global values and see if they get merged or not, feel free to correct me if you get different results, am here for it.

Collapse
 
lincolnwdaniel profile image
Lincoln W Daniel

Can you point me to where the fresh store is being created? All throughout the code for the package, it's using the singleton that's exported. I already fixed the problem as I described because I tested setting values on the store with the incoming request ID as the key during SSR from multiple browsers and saw that all the values were in the store across the requests.