It would be:
Initial store set up -> Access store state -> View render -> Display UI
Looking into this code:
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById("root")
);
(Initial Store Setup): The
store
is first created viacreateStore()
. Here, the entire application state tree is created.(Access store state): mapping it as props via
mapStateToProps()
. React would need to know the state and props required for this component to render correctly.(View Render): Then React would call the component’s
render()
or the return of functional components.(Display UI): Then this output is mounted in the DOM or updated for state changes (cycles back to Step 2).
See React’s lifecycle recap as reference.
CLICK HERE to find out more related problems solutions.