- I would use
localStorage.setItem('token', 'xyz')
andlocalStorage.getItem('token')
for storing the auth token. Your current solution works, but it's considered less secure for some browsers (here's an article on SO) - I would consider adding
window.devToolsExtension()
to support the Redux chrome extension – an example of how we do it - Organize imports according to Plaid JS style guide
- You can create a new object by doing:
return { ...state,
hashId: action.parsedToken,