Support multiple React apps #8647
Unanswered
ondrejvelisek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
imagine situation where developer uses more react apps.
Eg. while gradually migrating project from some legacy component framework to React. Going from leaf components (single React apps) gradually merging them into bigger and bigger ones untill whole app is migrated. (our case but believe it is a common approach)
We encounter a problem, that multiple React Routers (
<HashRouter/>) does not share some context.e.g.
navigatefromuseNavigatecalled from<AppA/>does not trigger rerenders in<AppB/>and<AppC/>viauseMatchand<Route/>.I was suprised by this behaviour (using RR v6). I thought that anything I do via
react-routerwill manipulate Browser page state, it triggers some global callback which all HashRouters are listening to internally and triggers its rerenders. Am I wrong?Anyway. Is there a way to obtain such behaviour in
react-router?Lastly I will point out, that other libraries solves this by some shared context configuration. Examples:
react-queryreact-reduxokta-reactSorry if missunderstood something and thank you for constructive discussion and answers. :)
Beta Was this translation helpful? Give feedback.
All reactions