I'm new to react & redux and I always think of states if people can access the states via the F12 Developer console and view and change the state
value with use of Dispatch
?
Asked
Active
Viewed 21 times
0
-
1There is an extension for Redux named "Redux Devtools" for browsers – whygee Dec 15 '21 at 16:23
-
1https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en – gunwin Dec 15 '21 at 16:25
-
I'm aware of this extension but my question is if everyone can update / change the value of some state – Dor Furman Dec 15 '21 at 16:30
-
Oh I see your question now. Yeah, whatever is in the frontend people can see, change, mess with however they want and there is pretty much nothing you can do about it. If someone changes the states it will only affect the behavior of the website for him not other users. – whygee Dec 15 '21 at 16:35
-
Oh I see.. so if for example I want to check if the user is logged in and there's a state that check for it let's say its called isLogged that means that the user can change that for true so I can't use state to check for log in status, only by accessing the database – Dor Furman Dec 15 '21 at 16:37
-
You can use state, you just need to be aware that nothing client-side is 100% secure. For anything important or sensitive, you need to do it server-side – Brian Thompson Dec 15 '21 at 16:38
-
I disagree with the duplicate closure, but I do think it should have been closed as needing far more detail. – Brian Thompson Dec 15 '21 at 16:39