taskorial
taskorial copied to clipboard
Site is re-rendered on opening the NavLinks
Describe the bug Whenever a user clicks on the Navbar Links, i.e. Login and Sign Up, or even the redirection after the login and signup, the page gets re-rendered. We are using react-router-dom, so, we should use the features along with it. If we just wrap the text content in login and signup with the Link tag from react-router-dom, our website would no longer be re-rendered. And similarly, just use the useNavigate hook to redirect after a user is logged in, or signs up.
To Reproduce Steps to reproduce the behavior:
- Just click on a navbar link
Expected behavior The content of the routes should just be replaced, instead of the entire application, re-rendering.