diff --git a/README.md b/README.md index 1437b74..b630b84 100644 --- a/README.md +++ b/README.md @@ -85,17 +85,17 @@ function FancyList(props) { const [filter, setFilter] = useState(''); return ( <> - + ); } ``` -- you need to refactor all `FancyInput` usage, pass `value`, and `setValue` to make it work as expected -- the top-level component (`FancyList`) re-render each time the `filter` changes +- you need to refactor all the `FancyInput` usages, pass `value`, and `setValue` to make it work as expected +- the top-level component (`FancyList`) re-renders each time the `filter` changes -Let see how react-wire help you: +Let see how react-wire helps you: ```tsx function FancyInput(props) { @@ -105,7 +105,7 @@ function FancyInput(props) { } ``` -Same as above, but use `useWireState` instead of `useState`, right now `FancyInput` is uncontrolled. Now, if you need to make it controllable, you should pass an up-link wire. +Same as above, but use `useWireState` instead of `useState`, right now `FancyInput` is uncontrolled. If you need to make it controllable, you should pass an up-link wire. ```diff function FancyInput(props) { @@ -123,7 +123,7 @@ function FancyList(props) { const filter$ = useWire(null, ''); return ( <> - + ); @@ -132,10 +132,10 @@ function FancyList(props) { With this new code: -- all `FancyInput` uncontrolled usage is working as expected without any change +- all the `FancyInput` uncontrolled usages are working as expected without any change - the Top-level component (`FancyList`) will not re-render each time the value changes - only detailed components (`FancyInput`, `List`) will re-render each time the value changes -- `FancyInput` is now controllable and can be used as a controlled or uncontrolled component by passing a wire. +- `FancyInput` is now controllable and can be used as a controlled or uncontrolled component by passing a wire - `FancyList` can be controllable if you want: ```tsx @@ -145,7 +145,7 @@ function FancyList(props) { } ``` -react-wire have more advanced features: +react-wire has more advanced features: - selectors to maintain calculated values - fns to pass function calls over the wire