Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee8ae2d

Browse files
committed
update readme
1 parentf5c65a6 commitee8ae2d

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
@@ -52,13 +52,16 @@ tree.a.b.c = 2
5252
// a, b and c are fired but sibling d is not fired
5353

5454
// 🙋‍♂️
55-
//2. Modifying a parent notifies therelevantchildren listeners.
55+
//3. Modifying a parentonlynotifies the children listeners, if the children have also changed.
5656
tree.a= {...tree.a }
5757
// 👉 a { b: { c: 2 } }
5858
// a is fired but b, c and d are not fired
5959
tree.a= { e:1 }
6060
// 👉 a { e: 1 }
61-
// b, c and d have been deleted so we just notify with undefined
61+
// 👉 b undefined
62+
// 👉 c undefined
63+
// 👉 d undefined
64+
// b, c and d have been deleted so they should be notified with undefined
6265
```
6366

6467
###Implementation Sketch
@@ -104,4 +107,4 @@ const useStoreState = (selector) => {
104107

105108
##Implementation
106109

107-
Here is my implementation of the[observable state tree](https://github.com/mfbx9da4/observable-state-tree/blob/main/observableStateTree/observableStateTree.ts#L13). I couldn't quite get the above API but I came[pretty close by using proxies](https://github.com/mfbx9da4/observable-state-tree/blob/main/pages/dotNotationExample.tsx). See the[react example here](https://github.com/mfbx9da4/observable-state-tree/blob/main/pages/reactExample.tsx).
110+
Here is my implementation of the[observable state tree](https://github.com/mfbx9da4/observable-state-tree/blob/main/observableStateTree/observableStateTree.ts#L13). I couldn't quite get the above API but I came[pretty close by using proxies](https://github.com/mfbx9da4/observable-state-tree/blob/main/pages/dotNotationExample.tsx). See the[react example here](https://github.com/mfbx9da4/observable-state-tree/blob/main/pages/reactExample.tsx). See the[rudimentary unit tests here](https://github.com/mfbx9da4/observable-state-tree/blob/main/pages/unitTests.ts).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp