Skip to content

Commit 50b9e04

Browse files
committed
Update README.md
1 parent 715e67f commit 50b9e04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default connect(
130130
```
131131

132132
Whether to put the `connect()` call in the same file as the “dumb” component, or separately, is up to you.
133-
Ask yourself whether you'd want to reuse this component but bind it to different data, or not.
133+
Ask yourself whether youd want to reuse this component but bind it to different data, or not.
134134

135135
### Nesting
136136

@@ -463,11 +463,11 @@ render() {
463463
Conveniently, this gives your components access to the router state!
464464
You can also upgrade to React Router 1.0 which shouldn’t have this problem. (Let us know if it does!)
465465

466-
### My views aren't updating when something changes outside of Redux
466+
### My views arent updating when something changes outside of Redux
467467

468468
If your views depend on global state or [React “context”](www.youtube.com/watch?v=H7vlH-wntD4), you might find that views decorated with `connect()` will fail to update.
469469

470-
>This is because `connect()` implements [shouldComponentUpdate](https://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) by default, assuming that your component will produce the same results given the same props and state. This is a similar concept to React's [PureRenderMixin](https://facebook.github.io/react/docs/pure-render-mixin.html).
470+
>This is because `connect()` implements [shouldComponentUpdate](https://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) by default, assuming that your component will produce the same results given the same props and state. This is a similar concept to Reacts [PureRenderMixin](https://facebook.github.io/react/docs/pure-render-mixin.html).
471471
472472
The _best_ solution to this is to make sure that your components are pure and pass any external state to them via props. This will ensure that your views do not re-render unless they actually need to re-render and will greatly speed up your application.
473473

@@ -493,7 +493,7 @@ If you have context issues,
493493
2. Make sure you didn’t forget to wrap your root component in [`<Provider>`](#provider-store).
494494
3. If you use React Router, something like `<Provider>{() => router}</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>{() => router}</Provider>`, write `<Provider>{() => createRouter()}</Provider>` where `createRouter()` is a function that actually *creates* (and returns) the router.
495495

496-
### Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner
496+
### Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that youre trying to add a ref to a component that doesnt have an owner
497497

498498
If you’re using React for web, this usually means you have a [duplicate React](https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375). Follow the linked instructions to fix this.
499499

0 commit comments

Comments
 (0)