Without this the browser will say :"I don't have instruction on how to handle the url with the query string!"
The modification will be redirected to the index.html page and then React Router can handle the change and send the right Route.
output :{
publicPath: '/'
}
devServer :{
historyApiFallback: true
}
「wds」: Project is running at http://localhost:8080/
「wds」: webpack output is served from /
「wds」: Content not from webpack is served from /Users/steph08/Documents/Documents - Steph07's MacBook Pro/Tyler McGinnis/React/Hacker-News
「wds」: 404s will fallback to /index.html
「wdm」: wait until bundle finished: /
「wdm」: Hash: 89d19e8bb9e62da2c26a
import { BrowserRouter as Router, Route } from "react-router-dom";
<Route path='/' render={(props)=> <Component {...props} propsTopass={propsTopass}>}> </Route