Comments (2)
Hey @winstonpurnomo, the router is going to parse the paths in the order listed, so you either need to reorder or use the "exact path" like in the root path.
For example, either do this:
<Route exact path="/" component={Index} />
<Route path="/about" component={About} />
<Route path="/work/co1" component={Company1} />
<Route path="/work/co2" component={Company2} />
<Route path="/work" component={Work} />
<Route component={NotFound} status={404} />
or this
<Route exact path="/" component={Index} />
<Route path="/about" component={About} />
<Route exact path="/work" component={Work} />
<Route path="/work/co1" component={Company1} />
<Route path="/work/co2" component={Company2} />
<Route component={NotFound} status={404} />
Hope this helps!
from personal-site.
Thank you!
from personal-site.
Related Issues (20)
- Menu with yellow border on mobile HOT 3
- npm install fails. HOT 3
- PAGES FAILING FOR NEW PACKAGE.JSON HOT 1
- node-sass v4.14.1 incompatible with node 15+
- CSS not rendering
- Is there any way to add link to each project in the project page ??? HOT 2
- ESlint Error on Windows HOT 1
- Migrating from Google Analytics UA to GA4 HOT 1
- Suggestion: Blog/Journal pages HOT 1
- Deploying from a Fork to GH Pages with Workflow HOT 4
- Can't modify Michael's name in navigation bar HOT 1
- Bolder underline for hyperlinks HOT 1
- Deployment timing out HOT 5
- Contribution Instructions HOT 1
- Deployment Instructions HOT 1
- Minified React error #418; #423; in production build HOT 3
- npm build not working HOT 7
- Error -86 on npm run predeploy using react-snap with Puppeteer HOT 2
- Page is showing readme file HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from personal-site.