Need help with "Warning: getRouteProps could not find..."
See original GitHub issueI’ve got a problem only on development mode with the client-side navigation.
I can access localhost:3000/tom
directly but i can’t navigate from localhost:3000/john
to localhost:3000/tom
for example.
Any ideas ?
// static.config.js
export default {
getSiteProps: () => ({}),
getRoutes: async () => {
return [
{
path: '/john',
component: 'src/containers/Hi',
getProps: async () => ({
name: 'john'
})
},
{
path: '/tom',
component: 'src/containers/Hi',
getProps: async () => ({
name: 'tom'
})
},
]
},
}
// src/containers/Hi.js
import React from 'react'
import { getRouteProps } from 'react-static'
export default getRouteProps(({ name }) => (
<div>
<h1>Hi {name} !</h1>
</div>
))
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to import the types of react-dropzone?
I'm using react-dropzone with typescript, but I don't know how to import the types off ... I could not find it in the...
Read more >Beginner friendly docs · Issue #263 · downshift-js ...
I wanted to bring attention to something I've experienced when integrating this component into the app I'm building.
Read more >react-dropzone - npm
Warning : On most recent browsers versions, the files given by onDrop won't have properties path or fullPath , see this SO question...
Read more >react-dropzone
Simple React hook to create a HTML5-compliant drag'n'drop zone for files. Documentation and examples at https://react-dropzone.js.org.
Read more >How To Drag and Drop Files in React Applications with ...
In this article you will learn how to easily add a drop zone for files in React projects with react-dropzone. We will see...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like because the prefetch is done on componentWillMount but not on componentWillReceiveProps. I use the same container. What do you think ?
Fixed with #255. Release is queued 😉