Skip to content

Commit 00e9c1c

Browse files
committed
docs: update readme
1 parent 2dc59e3 commit 00e9c1c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ const AnimationFrameScheduler = asyncScheduler(requestAnimationFrame);
146146

147147
`@embra/reactivity` is designed to be framework agnostic. It can be used with any framework or library that supports JavaScript. It also provides first-class support for React.
148148

149+
- Reactive values as component props are just simpler and more efficient.
150+
- `value` = `Readable`
151+
- `value` + `onChange` = `Writable`
152+
- `state` + `action` = `toWritable(derive(rootState$, selector), action)` (See [State and Actions](#-flexible-abstractions-of-state-and-actions))
153+
- A lot of re-renderings can be avoided when passing reactive values down the props. You only need to subscribe to the reactive values that are actually used in the component.
154+
149155
```tsx
150156
import { writable } from "@embra/reactivity";
151157
import { useValue, useDerived, useCombined } from "@embra/reactivity/react";

0 commit comments

Comments
 (0)