Home > Mobile >  i am in newbie in react and facing error .i want to show all images in homepage , when i click in ho
i am in newbie in react and facing error .i want to show all images in homepage , when i click in ho

Time:05-10

onst Home = () => { const navigate = useNavigate(); navigate(/inventory); return ( <Link to={/inventory}> {" "}

Manage Inventories

); };

export default Home; 

CodePudding user response:

You have navigate("/inventory"); in the function body of your code. That is why your code goes to another page on load. To fix this, simply remove that line.

  • Related