Home > Net >  React Router v6.4.1 createBrowserRouter not working
React Router v6.4.1 createBrowserRouter not working

Time:09-30

I'm creating an app with react v18 & react-router-dom v6.4.1 where I'm using the createBrowserRouter function as they show in the docs (enter image description here

CodePudding user response:

I've just tried this in my PC

You should declare this in a .tsx file.

It doesn't work in a .ts file.

I hope this works for you

  • Related