How create custom hook for login/register with e.preventDefault()
I want create custom hook for login and register functions because its best practice DRY (don't repeat yourself)
I use the same function in /login and in AuthModal.tsx
Here is my function for register
How do I create custom hook for it - when I tried do this I got an error that tells me that I need 3 arguments instead of 2 (it was login and password but it requires also e)
that uses for e.preventDefault()
I have this form
0 Replies