Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ person.name = 'Ann';
export default person;
```

The first example wouldn't trigger re-renders on the `person.name = 'Ann'` mutation, because it is targeted at the raw object. Mutating the raw - none `store`-wrapped object - won't schedule renders.
The first example wouldn't trigger re-renders on the `person.name = 'Ann'` mutation, because it is targeted at the raw object. Mutating the raw - non-`store`-wrapped object - won't schedule renders.

</details>
<p></p>
Expand Down Expand Up @@ -692,10 +692,10 @@ export default view(() => {
```

<details>
<summary>Explicitly pass none reactive dependencies - like vanillas props and state - to local auto effects in function components.</summary>
<summary>Explicitly pass non-reactive dependencies - like vanillas props and state - to local auto effects in function components.</summary>
<p></p>

Because of the design of React hooks you have to explicitly pass all none reactive data to a hook-like dependency array. This makes sure that the effect also runs when the none reactive data changes.
Because of the design of React hooks you have to explicitly pass all non-reactive data to a hook-like dependency array. This makes sure that the effect also runs when the non-reactive data changes.

```jsx
import React from 'react'
Expand Down
4 changes: 2 additions & 2 deletions src/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export let isInsideFunctionComponentWithoutHooks = false;
const COMPONENT = Symbol('owner component');

function mapStateToStores(state) {
// find store properties and map them to their none observable raw value
// to do not trigger none static this.setState calls
// find store properties and map them to their non-observable raw value
// to do not trigger non-static this.setState calls
// from the static getDerivedStateFromProps lifecycle method
const component = state[COMPONENT];
return Object.keys(component)
Expand Down