Archives : August-2020

I’m trying to import react-router-dom and history for work with React-router but doesn’t work and I get this error. I imported this packages: yarn add react-router-dom yarn add history I’m working under v14.4.0 version of node. This is my code: index.js: import React from ‘react’; import ReactDOM from ‘react-dom’; import { Router } from ‘react-router-dom’; ..

Read more

I am trying to setup some nesting routing in my app and for some reason I can’t get it to open my nested pages. In index.js <Router> <Switch> <Route exact path="/" component={App}/> <Route path="/admin" component={AdminApp}/> <Route component={() => { return <div>Page not found</div>}}/> </Switch> </Router> In AdminApp.jsx: import ViewUser from "./ViewUser"; export default function AdminApp({ ..

Read more