Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] how should i integrate with RouterProvider of React Router V6? #980

Closed
luoqiang-wm opened this issue Jun 12, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@luoqiang-wm
Copy link

Describe the bug
i integrate with RouterProvider of React Router V6, and it report an error: You cannot render a inside another . You should never have more than one in your app.

To Reproduce

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <React.StrictMode>
    <FronteggProvider contextOptions={contextOptions} hostedLoginBox={true} authOptions={authOptions}>
      <RouterProvider router={createBrowserRouter(Routes)}></RouterProvider>
    </FronteggProvider>
  </React.StrictMode>,
);

Screenshots
image

@luoqiang-wm luoqiang-wm added the bug Something isn't working label Jun 12, 2023
@MashaPav
Copy link

Hi @KaynRonan!

Can you please email us at support@frontegg.com with the details of your package.json or send a message in one of our community slack channels?

We will be happy to help you set this up via one of these communication channels.

@luoqiang-wm
Copy link
Author

Hi @KaynRonan!

Can you please email us at support@frontegg.com with the details of your package.json or send a message in one of our community slack channels?

We will be happy to help you set this up via one of these communication channels.

maybe you can try a demo with react-router v6,and then you can improve you docs tell developers how can we use frontegg with react-router v6.
your document does not provide any explanation about the react router, it simply refers to a component internally

@MashaPav
Copy link

Thanks for the feedback @KaynRonan, we are actively working on improving our documentation and we'll take that into consideration! In case you'll need any help in the meantime, feel free to send us a message via one of the support channels.

@MashaPav
Copy link

The full solution for using react router v6 with @frontegg/react is described here - https://support.frontegg.com/hc/en-us/articles/11571585765789-How-to-use-React-Router-v6-with-Frontegg-

@mattotodd
Copy link

thx @MashaPav that article was super helper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants