mirror of
https://github.com/re-rxjs/react-rxjs.git
synced 2025-12-08 18:01:51 +00:00
fix(README): subjectFactory example
This commit is contained in:
parent
20cb9e5879
commit
a3d9dd163c
@ -184,9 +184,9 @@ const useCounter = connectFactoryObservable(
|
||||
const Counter: React.FC<{id: string}> = ({id}) => {
|
||||
const counter = useCounter(id);
|
||||
return (
|
||||
<button onClick={onDec(id)} />-</button>
|
||||
<button onClick={() => onDec(id)} />-</button>
|
||||
{counter}
|
||||
<button onClick={onInc(id)} />+</button
|
||||
<button onClick={() => onInc(id)} />+</button
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user