Skip to content

Components with calls to <Link> #182

Answered by fwouts
HAN20190621 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @HAN20190621, welcome to React!

I'd encourage you to use Preview.js, which is going to replace React Preview very soon. They're basically the same, except Preview.js is more recent and supports frameworks other than React :)

You can definitely make this work, all you need is to set up a Wrapper file that includes the BrowserRouter component. I've added an example app so you can use that for inspiration! See https://github.com/fwouts/previewjs/tree/main/smoke-test-apps/cra-react-router

The same should also work with React Preview, the only difference being that the __previewjs__ directory would be named __reactpreview__ instead.

See https://previewjs.com/docs/config/wrapper for documen…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by fwouts
Comment options

You must be logged in to vote
1 reply
@fwouts
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants