Hello everyone. I studied and studied at MERN. I also created a project. Now I don’t believe what I did was right. Now that matters to me. Sorry my english:)
I have seen many projects on the internet, but the method used in most of them did not match mine. For example many people use jwt for authentication. But I use passportjs and passport-local-mongoose. I successfully registered and loginned in backen(express). In frontend every component I used action ( redux ) for get user information loginned or not like this:
UseEffect( ()=>{
User_Auth(12); // why 12? If I didnt write this value
// action cannot work but when I put work
// well and this value I cant do with.
} )
This methog is true? If you want to see this simple project please see this: https://github.com/Feruz00/login_register/tree/master
Thanks