import React from 'react';
import { Link,Router } from 'react-router-dom';
const Navbar = () => {
return (
<div className='p-5 pb-0 flex flex-wrap sm:justify-between justify-center item-center border-b dark:border-gray-700 border-gray-200'>
<div className="w-screen flex justify-between items-center space-x-5">
<Link to="/">
<p className='text-2xl '>Not Google</p>
</Link>
</div>
</div>
)
}
export default Navbar
Asked
Active
Viewed 173 times
1

Youssouf Oumar
- 29,373
- 11
- 46
- 65

SCHWITZ
- 19
- 1
-
Does this answer your question? [Invariant failed: You should not use
outside a – Youssouf Oumar Sep 04 '22 at 19:24](https://stackoverflow.com/questions/55552147/invariant-failed-you-should-not-use-route-outside-a-router)
1 Answers
0
Your Navbar component should be a child (any nesting depth) of Router component. Please check where is your Router component (BrowserRouter, etc...)

Andrey Smolko
- 712
- 3
- 8