Skip to content

Commit 3a91457

Browse files
authored
Tweak 09_usingovermindwithreact for fluency
1 parent fcf7a35 commit 3a91457

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/overmind-website/guides/beginner/09_usingovermindwithreact.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
There are two different ways to connect Overmind to React. You can either use a traditional **Higher Order Component** or you can use the new **hooks** api to expose state and actions.
44

5-
When you connect Overmind to a component you ensure that whenever any tracked state changes only components interested in that state will rerender and they will rerender "at their point in the component tree". That means we remove a lot of unnecessary work from React. There is no reason for the whole React component tree to rerender when only one component is interested in a change.
5+
When you connect Overmind to a component you ensure that whenever any tracked state changes, only components interested in that state will re-render, and will do so "at their location in the component tree". That means we remove a lot of unnecessary work from React. There is no reason for the whole React component tree to re-render when only one component is interested in a change.
66

77
## With hook
88
```marksy
@@ -30,7 +30,7 @@ The hook effect of React gives a natural point of running effects related to sta
3030
h(Example, { name: "guide/usingovermindwithreact/hook_effect" })
3131
```
3232

33-
You can also here use the traditional approach adding a subscription to any updates. This also allows for more granular control as you can check the specific mutations made and/or do pattern matching on the paths updated.
33+
Here you can also use the traditional approach of subscribing to updates. This also allows for more granular control as you can check the specific mutations made and/or do pattern matching on the paths updated.
3434

3535
```marksy
3636
h(Example, { name: "guide/usingovermindwithreact/hook_effect_subscription" })
@@ -67,4 +67,4 @@ To run effects in components based on changes to state you use the **addMutation
6767

6868
```marksy
6969
h(Example, { name: "guide/usingovermindwithreact/hoc_effect" })
70-
```
70+
```

0 commit comments

Comments
 (0)