Nextjs 16. Not Re-amounts the React hook forms.
Unanswered
Lilac posted this in #help-forum
LilacOP
I have login page and it return login form component. then I logout ( in the dashboard) and being taken to login page to sign in again. the form ( login form) still holds data. I am using react hook form unless I use unique key to every single form using Date object . but I need to know it is behaving in this way. and by the way before, I upgrade my project to next 16 it was fine and working properyly. is this has to do with weird caching or some sort of unknow behvoiour? I am consufed .
2 Replies
Magnolia Warbler
can you create a minimum reproducible repo/
@Magnolia Warbler can you create a minimum reproducible repo/
LilacOP
Okie I wll be doing that and will share with you . Nexjts 16 preserves the client State in page navigation . and I need my form to be re-mounts everytime I navigate to the page. so far I solved it by doing some hacky way like useEffect and /or so on.