Created a simple login form using React, Typescript and React Material UI featuring useReducer
and useEffect
hooks.
A detailed article on How to build a React Login Form with Typescript and React hooks
Created a simple login form using React, Typescript and React Material UI featuring useReducer
and useEffect
hooks.
A detailed article on How to build a React Login Form with Typescript and React hooks
For further actions, you may consider blocking this person and/or reporting abuse
Husniddin6939 -
Peter Strøiman -
Prince -
Majd Al Mnayer -
Top comments (3)
I've found that when using multiple
useState
hooks, it becomes easier to move touseReducer
, especially when conditions mutate multiple pieces of state. I thinkuseState
still works well in your example, but once you build a more complex login (with 2FA, requiring a new user to set a new password, etc), it can get messy quickly.you can also refactor your from with concent, it is worth doing.
here is 2 demos:
js ver: codesandbox.io/s/concent-guide-xvcej
ts ver: codesandbox.io/s/concent-guide-ts-...
Sure, I will look into it.
Thanks