You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I just start my environment development or production server after an upgrade.
I realized my redux actions are not triggered the first time I make a request http get to get the DOM. But triggered all the time afterwards.
I know this is due to the split code loadable-component. But is there a way to catch the redux trigger action all the time (especially the first time when the server just started)
Many thanks.
The text was updated successfully, but these errors were encountered:
Redux saga, as well as data-fetching during SSR is something loadable component should not carry about. And could not carry about.
SSR is a single pass process, and you have to have all the data (and await for it) before rendering application. Sometimes to make it work you have to "render" you application a few times, untill it would not emit any new side effects on the next render - for example this is how graphql apollo works.
What shall you do - think how to "ask" for the data outside of React, and especially outside of React Component constructor.
Just throw react-router to the bin, and use react-navi or react-first-router.
tomtom94
changed the title
[SSR/redux-saga] first F5 fetch not waited, but all the next F5 ones yes
[SSR/redux-saga] first request http get doesn't trigger actions, but all the next ones yes
Dec 19, 2020
I am encountering an issue.
When I just start my environment
development
orproduction
server after an upgrade.I realized my redux actions are not triggered the first time I make a request http get to get the DOM. But triggered all the time afterwards.
I know this is due to the split code
loadable-component
. But is there a way to catch the redux trigger action all the time (especially the first time when the server just started)Many thanks.
The text was updated successfully, but these errors were encountered: