Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to check if user has logged in for the first time in react js

So I’m building a school matching website where users fill out a form and get matched with someone with similar information. I’ve completed the login and registering section. If a user registers and then logs in for the first time they should have a form to fill out. But if they’re coming back and log in later on for a second time they shouldn’t have to fill out a form. What are some ways to differentiate and figure out who to give a form to?
Thank you

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Don’t differentiate on the basis of "has this user logged in before". Instead, focus on the actual requirement: "do we have this user’s match-related details".

You’ll presumably be storing those details somewhere, so every time a user logs in, you’ll need to try and retrieve their details. If none are stored for this user, present them with the form [and then store the information on it once they submit it].

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading