DEV Community

Discussion on: Simple responsive navigation bar | React.js

Collapse
 
olajesu070 profile image
OLAJESU BENJAMIN

ERROR in ./src/App.js 21:35-41
export 'Switch' (imported as 'Switch') was not found in 'react-router-dom' (possible exports: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createPath, createRoutesFromChildren, createSearchParams, generatePath, matchPath, matchRoutes, parsePath, renderMatches, resolvePath, unstable_HistoryRouter, useHref, useInRouterContext, useLinkClickHandler, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes, useSearchParams)

ERROR in ./src/components/Navbar/NavbarElements.js 5:0-39
Module not found: Error: Can't resolve 'styled-components' in 'C:\Users\MAX\header\src\components\Navbar'

webpack compiled with 2 errors

Collapse
 
stephanieopala profile image
Stephanie Opala

react-router-dom updated their syntax. Use Routes instead of Switch
You can find more information here.
github.com/howtographql/howtograph...

Collapse
 
olajesu070 profile image
OLAJESU BENJAMIN

Compiled with problems:X

ERROR in ./src/components/Navbar/NavbarElements.js 5:0-39

Module not found: Error: Can't resolve 'styled-components' in 'C:\Users\MAX\nav\src\components\Navbar'

Thread Thread
 
olajesu070 profile image
OLAJESU BENJAMIN

npm install styled-components --save

THIS FIXED IT

many thanks, would like to have some clearity conversation with you

Collapse
 
tagwirei12 profile image
tagwirei12

hello there, I keep getting a blank page on my browser any help?