Skip to content

[v6] Can't use useRoutes hook with Router component #7541

@kcsujeet

Description

@kcsujeet

Version

6.0.0-beta.0

Steps to reproduce

  • import Router from 'react-router-dom' instead of BrowserRouter

  • use useRoutes hook to build routes object as shown here

Expected Behavior

Everything should work fine

Actual Behavior

Getting this error instead Error: useRoutes() may be used only in the context of a < Router > component

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions