Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

Cannot implement routing in react "dispatcher is null"

$
0
0

That is my App.js

import logo from './logo.svg';import './App.css';import Header  from  './componentes/Header';import FormularioLogin from './componentes/FormularioLogin';import { createBrowserRouter, RouterProvider } from 'react-router-dom';import Menu from './pages/Menu';const router = createBrowserRouter( [ {path: 'menu', Component: <Menu/> }, {path: '/', Component: <App/> },])function App() {  return <RouterProvider router={router} />;}export default App;

That's my Menu.js

export default function Menu() {    return (<div>teste</div>)}

The app as created with create-react-app

Complete error

Uncaught runtime errors:ERRORdispatcher is nulluseState@http://localhost:3000/static/js/bundle.js:35452:7RouterProvider@http://localhost:3000/static/js/bundle.js:31433:66renderWithHooks@http://localhost:3000/static/js/bundle.js:56085:31mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:60056:17beginWork@http://localhost:3000/static/js/bundle.js:61359:20callCallback@http://localhost:3000/static/js/bundle.js:46341:18invokeGuardedCallbackDev@http://localhost:3000/static/js/bundle.js:46385:20invokeGuardedCallback@http://localhost:3000/static/js/bundle.js:46442:35beginWork$1@http://localhost:3000/static/js/bundle.js:66340:32performUnitOfWork@http://localhost:3000/static/js/bundle.js:65588:16workLoopSync@http://localhost:3000/static/js/bundle.js:65511:26renderRootSync@http://localhost:3000/static/js/bundle.js:65484:11performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:64879:78workLoop@http://localhost:3000/static/js/bundle.js:72919:46flushWork@http://localhost:3000/static/js/bundle.js:72897:18performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:73134:25ERRORdispatcher is nulluseState@http://localhost:3000/static/js/bundle.js:35452:7RouterProvider@http://localhost:3000/static/js/bundle.js:31433:66renderWithHooks@http://localhost:3000/static/js/bundle.js:56085:31mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:60056:17beginWork@http://localhost:3000/static/js/bundle.js:61359:20callCallback@http://localhost:3000/static/js/bundle.js:46341:18invokeGuardedCallbackDev@http://localhost:3000/static/js/bundle.js:46385:20invokeGuardedCallback@http://localhost:3000/static/js/bundle.js:46442:35beginWork$1@http://localhost:3000/static/js/bundle.js:66340:32performUnitOfWork@http://localhost:3000/static/js/bundle.js:65588:16workLoopSync@http://localhost:3000/static/js/bundle.js:65511:26renderRootSync@http://localhost:3000/static/js/bundle.js:65484:11performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:64879:78workLoop@http://localhost:3000/static/js/bundle.js:72919:46flushWork@http://localhost:3000/static/js/bundle.js:72897:18performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:73134:25ERRORdispatcher is nulluseState@http://localhost:3000/static/js/bundle.js:35452:7RouterProvider@http://localhost:3000/static/js/bundle.js:31433:66renderWithHooks@http://localhost:3000/static/js/bundle.js:56085:31mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:60056:17beginWork@http://localhost:3000/static/js/bundle.js:61359:20callCallback@http://localhost:3000/static/js/bundle.js:46341:18invokeGuardedCallbackDev@http://localhost:3000/static/js/bundle.js:46385:20invokeGuardedCallback@http://localhost:3000/static/js/bundle.js:46442:35beginWork$1@http://localhost:3000/static/js/bundle.js:66340:32performUnitOfWork@http://localhost:3000/static/js/bundle.js:65588:16workLoopSync@http://localhost:3000/static/js/bundle.js:65511:26renderRootSync@http://localhost:3000/static/js/bundle.js:65484:11recoverFromConcurrentError@http://localhost:3000/static/js/bundle.js:64976:38performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:64889:26workLoop@http://localhost:3000/static/js/bundle.js:72919:46flushWork@http://localhost:3000/static/js/bundle.js:72897:18performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:73134:25ERRORdispatcher is nulluseState@http://localhost:3000/static/js/bundle.js:35452:7RouterProvider@http://localhost:3000/static/js/bundle.js:31433:66renderWithHooks@http://localhost:3000/static/js/bundle.js:56085:31mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:60056:17beginWork@http://localhost:3000/static/js/bundle.js:61359:20callCallback@http://localhost:3000/static/js/bundle.js:46341:18invokeGuardedCallbackDev@http://localhost:3000/static/js/bundle.js:46385:20invokeGuardedCallback@http://localhost:3000/static/js/bundle.js:46442:35beginWork$1@http://localhost:3000/static/js/bundle.js:66340:32performUnitOfWork@http://localhost:3000/static/js/bundle.js:65588:16workLoopSync@http://localhost:3000/static/js/bundle.js:65511:26renderRootSync@http://localhost:3000/static/js/bundle.js:65484:11performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:64879:78workLoop@http://localhost:3000/static/js/bundle.js:72919:46flushWork@http://localhost:3000/static/js/bundle.js:72897:18performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:73134:25ERRORdispatcher is nulluseState@http://localhost:3000/static/js/bundle.js:35452:7RouterProvider@http://localhost:3000/static/js/bundle.js:31433:66renderWithHooks@http://localhost:3000/static/js/bundle.js:56085:31mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:60056:17beginWork@http://localhost:3000/static/js/bundle.js:61359:20callCallback@http://localhost:3000/static/js/bundle.js:46341:18invokeGuardedCallbackDev@http://localhost:3000/static/js/bundle.js:46385:20invokeGuardedCallback@http://localhost:3000/static/js/bundle.js:46442:35beginWork$1@http://localhost:3000/static/js/bundle.js:66340:32performUnitOfWork@http://localhost:3000/static/js/bundle.js:65588:16workLoopSync@http://localhost:3000/static/js/bundle.js:65511:26renderRootSync@http://localhost:3000/static/js/bundle.js:65484:11recoverFromConcurrentError@http://localhost:3000/static/js/bundle.js:64976:38performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:64889:26workLoop@http://localhost:3000/static/js/bundle.js:72919:46flushWork@http://localhost:3000/static/js/bundle.js:72897:18performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:73134:25ERRORdispatcher is nulluseState@http://localhost:3000/static/js/bundle.js:35452:7RouterProvider@http://localhost:3000/static/js/bundle.js:31433:66renderWithHooks@http://localhost:3000/static/js/bundle.js:56085:31mountIndeterminateComponent@http://localhost:3000/static/js/bundle.js:60056:17beginWork@http://localhost:3000/static/js/bundle.js:61359:20beginWork$1@http://localhost:3000/static/js/bundle.js:66318:18performUnitOfWork@http://localhost:3000/static/js/bundle.js:65588:16workLoopSync@http://localhost:3000/static/js/bundle.js:65511:26renderRootSync@http://localhost:3000/static/js/bundle.js:65484:11recoverFromConcurrentError@http://localhost:3000/static/js/bundle.js:64976:38performConcurrentWorkOnRoot@http://localhost:3000/static/js/bundle.js:64889:26workLoop@http://localhost:3000/static/js/bundle.js:72919:46flushWork@http://localhost:3000/static/js/bundle.js:72897:18performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:73134:25

Viewing all articles
Browse latest Browse all 12141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>