Skip to content

Commit f839640

Browse files
Benjamin Knifflertannerlinsley
Benjamin Kniffler
authored andcommitted
Remove path="*" since its broken with latest dependencies (react-static#689)
react-router uses path-to-regexp, which will not recognize `*` Read https://github.com/pillarjs/path-to-regexp#compatibility-with-express--4x => No wildcard asterisk (*) - use parameters instead ((.*)) But leaving the path away in react-router `Route` will effectively match all routes.
1 parent cb227cd commit f839640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/static/generateRoutes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default class Routes extends Component {
155155
156156
// This is the default auto-routing renderer
157157
return (
158-
<Route path='*' render={props => {
158+
<Route render={props => {
159159
let Comp = getFullComponentForPath(props.location.pathname)
160160
// If Comp is used as a component here, it triggers React to re-mount the entire
161161
// component tree underneath during reconciliation, losing all internal state.

0 commit comments

Comments
 (0)