how to get the last state immediately after updating the state? #2158
-
hello.
thanks for helping :) |
Beta Was this translation helpful? Give feedback.
Answered by
markerikson
Mar 21, 2022
Replies: 1 comment 1 reply
-
You'd need to use a thunk, and call https://redux.js.org/usage/writing-logic-thunks#accessing-state |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
saman2007
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'd need to use a thunk, and call
getState()
. See the examples here:https://redux.js.org/usage/writing-logic-thunks#accessing-state