We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
i have some project and i wanna build wp theme with create-react wptheme but route is not working i already follow some tutorial in http://michaelsoriano.com/wordpress-theme-react-part-2-routes-context/ but router still not working this my code below
import React from 'react' import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import Archive from './templates/Archive'; import Single from './templates/Single'; const Routes = () => { return ( <Router> <Switch> <Route exact path="/" component={Archive} /> <Route path="/page" component={Single} /> </Switch> </Router> ) } export default Routes
in the single page
import React from 'react'
const Single = (props) => { return ( <div className="Post"> PAge Single </div> ) } export default Single
i use react-router-dom version 5.3.0
The text was updated successfully, but these errors were encountered:
It did not work for me either, maybe you should consider using the new router API, this worked for me.
Sorry, something went wrong.
Can you give an example? We're trying to bring this project up to React Router Dom v6 and the Context.js is proving hard to pin down.
Context.js
No branches or pull requests
i have some project and i wanna build wp theme with create-react wptheme but route is not working
i already follow some tutorial in http://michaelsoriano.com/wordpress-theme-react-part-2-routes-context/ but router still not working
this my code below
in the single page
import React from 'react'
i use react-router-dom version 5.3.0
The text was updated successfully, but these errors were encountered: