Relative Content

Tag Archive for javascriptreactjsreduxreact-redux

My state is not changing while the api request is correct

I am using Redux and when I send a get request to authenticate user it is working, creating a token in cookies, but in Redux the state is not changing. What am I doing wrong? When reloading the page my token and user data are valid, here are some code samples.

Javascript object keys and values

createSlice is
a function that accepts an object of reducer functions where keys in the reducer object will be used to generate string action type constants like this: