-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Is it possible to use react-router-dom in scratch-gui? If so, how can I do it? #9707
Comments
render-gui.jsx import React from 'react'; import AppStateHOC from '../lib/app-state-hoc.jsx'; const onClickLogo = () => { const handleTelemetryModalCancel = () => { const handleTelemetryModalOptIn = () => { const handleTelemetryModalOptOut = () => { export default (appTarget) => { const WrappedGui = compose(AppStateHOC, HashParserHOC)(GUI); const backpackHostMatches = window.location.href.match( const scratchDesktopMatches = window.location.href.match( if (process.env.NODE_ENV === 'production' && typeof window === 'object') { ReactDOM.render( 我昨天做的。 |
and u can use "react-router-dom": "^5.3.4", |
Hi @Tom-cy thanks for your answer! I see you are importing the Router, but where are you using it? 🤔 |
emmmmm, this ?
|
@Tom-cy thank you! it helped a lot, I was configuring the route in the wrong place instead of |
@Tom-cy sorry but I have one more question 🙇♀️ |
I am trying to integrate
react-router-dom
into thescratch-gui
mod project to handle routing. I attempted to configure the router in theapp-state-hoc.jsx
file, but it did not work as expected. Here is the code I tried:When I run the application, I get the following warning:
Any help or guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: