So you’re probably aware that you might not need Redux, but maybe Redux is a good fit for your app. That means we should use it for managing all of our application state… right? Wrong.
Posts about Redux
.When I first started out using Redux, I learned very quickly how to use (read: abuse) Redux actions. Actions and middleware used to be simple: if it’s synchronous, put it in an action, but if it’s asynchronous then you should use middleware.
One problem I’ve been struggling with lately is: what is the best way to store tokens when using redux? I could store it in the Redux state, but then it wouldn’t be there after refresh. I could just store it in the browser’s localStorage, but where would I do that?