bobangajicsm / react-portfolio-website

636 stars 797 forks source link

Router needs to be updated in App.js #4

Closed waasiq closed 2 years ago

waasiq commented 2 years ago

Hey, instead of using Routes the code be as following:

<Router>
         <Routes>
                <Route path="/" element={<Layout />}>
                <Route index element={<Home />} />
                <Route path="about" element={<About />} />
                <Route path="/contact" element={<Contact />} />
        < / Routes>
</Router>
waasiq commented 2 years ago

Router application was a bit outdated as well as useEffect were returning the value which should not be the fact. I fixed the router working in this repository, someone looking can look at the fixed issue here: https://github.com/TonyBalde18/react-portfolio