Skip to content

Commit 5e97bc1

Browse files
Merge pull request cerebral#147 from eirikhm/next
docs(website): fix typos
2 parents 13fbe52 + afa8ced commit 5e97bc1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/overmind-website/api/derive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Derive
22

3-
You can add derived state to your application. You access derived state like any other value, there is not need to call it as a function. The derived value is cached and will only update when any accessed state changes.
3+
You can add derived state to your application. You access derived state like any other value, there is no need to call it as a function. The derived value is cached and will only update when any accessed state changes.
44

55
```marksy
66
h(Example, { name: "api/derive" })

packages/overmind-website/guides/beginner/03_connectingcomponents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ In this example we are accessing the **isLoading** state. When this component re
1414

1515
When Overmind detects that the **App** component is interested in our **isLoading** state, it is not looking at the value itself, it is looking at the path. The component pointed to **state.isLoading**, which means when a mutation occurs on that path in the state, the component will render again. Since the value is a boolean value this can only happen when **isLoading** is replaced or removed. The same goes for strings and numbers as well. We do not say that we mutate a string, boolean or a number. We mutate the object or array that holds those values.
1616

17-
The story is a bit different if the state value is an object or an array. These values can not only be replaced and removed, they can also mutate themselves. En object can have keys added or removed. An array can have items added, removed and even change order of items. Overmind knows this and will notify components respectively. Let us look at how Overmind treats the following scenarios to get a better understanding.
17+
The story is a bit different if the state value is an object or an array. These values can not only be replaced and removed, they can also mutate themselves. An object can have keys added or removed. An array can have items added, removed and even change order of items. Overmind knows this and will notify components respectively. Let us look at how Overmind treats the following scenarios to get a better understanding.
1818

1919
### Arrays
2020

21-
When we just access en array in a component it will rerender if the array itself is replaced, removed or we do a mutation to it. That would mean we push a new item to it, we splice it or sort it.
21+
When we just access an array in a component it will rerender if the array itself is replaced, removed or we do a mutation to it. That would mean we push a new item to it, we splice it or sort it.
2222

2323
```marksy
2424
h(Example, { name: "guide/connectingcomponents/array_1" })

packages/overmind-website/guides/intermediate/01_managinglists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If your list consists of posts, these posts are most likely entities from the se
1515
h(Example, { name: "guide/managinglists/object" })
1616
```
1717

18-
Another benefit from using an object is that you have a direct reference to the entity by using its id. No need to iterate an array to find what you are looking for. So this is a good rule of thumb. If the state you are defining has unique identifiers they should most likely be stored as en object, not an array.
18+
Another benefit from using an object is that you have a direct reference to the entity by using its id. No need to iterate an array to find what you are looking for. So this is a good rule of thumb. If the state you are defining has unique identifiers they should most likely be stored as an object, not an array.
1919

2020
But we still want to use an array when we transform the state into a UI. Let us see what we can do about that.
2121

0 commit comments

Comments
 (0)