A
A
Almaz Familia2021-11-08 20:20:26
React
Almaz Familia, 2021-11-08 20:20:26

React error 'Route' is not defined?

hello
here is the code

import React from 'react'
import './App.css';
import Dialogs from './component/Dialogs.jsx';
import {BrowserRouter, Router} from 'react-router-dom';

function App() {
  return (
    <BrowserRouter>
      <div>
        <div className="content-box">
         <Route component={Dialogs}/>
        
        </div>   
      </div>
      </BrowserRouter>
    );
  }




  export default App;

Here is the Error

/src/App.js
Line 11:11: 'Route' is not defined react/jsx-no-undef

Search for the keywords to learn more about each error.


I don't understand what is wrong
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2021-11-08
@Casufi

Import error. Take a close look at what you import and what you use

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question