Skip to content

Commit dfd5c80

Browse files
committed
Update README.md
1 parent d13d76a commit dfd5c80

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,13 @@ render() {
432432
Conveniently, this gives your components access to the router state!
433433
You can also upgrade to React Router 1.0 which shouldn’t have this problem. (Let us know if it does!)
434434

435-
### I have some weird context error
435+
### Could not find "store" in either the context or props
436436

437-
If you have context issues, [make sure you don’t have duplicate React](https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375) on the page.
438-
Also make sure you didn’t forget to wrap your root component in [`<Provider>`](#provider-store).
437+
If you have context issues,
438+
439+
1. [Make sure you don’t have duplicate React](https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375) on the page.
440+
2. Make sure you didn’t forget to wrap your root component in [`<Provider>`](#provider-store).
441+
3. If you use React Router, something like `<Provider>{() => routes}</Provider>` won’t work. Due to the way context works in React 0.13, it’s important that the `<Provider>` children are *created* inside that function. Just referencing an outside variable doesn’t do the trick. Instead of `<Provider>{() => routes}</Provider>`, write `<Provider>{createRoutes}</Provider>` where `createRoutes()` is a functional that actually *creates* (and returns) the routes.
439442

440443
## License
441444

0 commit comments

Comments
 (0)