In redux, when an action is dispatched, reducer will change the state accordingly, the component which have called the action, also have access to the state ( passed through
In redux, when an action is dispatched, reducer will change the state accordingly, the component which have called the action, also have access to the state ( passed through props by Provider ). Am I right?
Yes, you are right. When action is dispatched, you need to specify the action creator, inside action creator you can fire sync or async action (using thunk or saga) and each action create have actionType and payload(optional. On calling action inside action creator, all the reducers will get inform and matches the type passed by action.
is the state the only way to access results of the action in the component? ( the component which have called the action ).
As redux best practice, state should be changed by reducer(as a pure function), which passed as a props to component if you listening to that state.
How about passing a callback function to the action, and using that to send the result back to the component?
you can pass callback function to action creator, action creator is just a function.