get current state in action redux thunk getstate code example Example 1: redux thunk npm install redux-thunk Example 2: thunk redux npm install --save redux-thunk