Olá galera td bem? Gostaria de um help.
Estou tendo problemas em iniciar o app depois que realizei as configurações do react-router. No console aparece o seguinte erro:
Uncaught Error: Target container is not a DOM element.
at invariant (react-dom.development.js:57)
at legacyRenderSubtreeIntoContainer (react-dom.development.js:19687)
at Object.render (react-dom.development.js:19776)
at Module../src/index.js (index.js:25)
at __webpack_require__ (bootstrap:782)
at fn (bootstrap:150)
at Object.0 (serviceWorker.js:131)
at __webpack_require__ (bootstrap:782)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
Alguém também já teve esse erro? Ou sabe o que ele pode significar?
Obs: Deixo logo abaixo as dependencias que instalei ao longo do 1° curso de react e também o meu index.js
"pubsub-js": "^1.7.0",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react-router-dom": "^4.1.1",
================================================================
const routes = (
<App>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/author" component={AuthorBox} />
<Route path="/book" />
</Switch>
</App>
);
ReactDOM.render(ReactDOM.render(
(
<Router>
{routes}
</Router>
),
document.getElementById('root')
));