Skip to content
This repository was archived by the owner on Jun 6, 2019. It is now read-only.

Commit b7efe52

Browse files
docs: Fix bug in README.md example
1 parent 541deb9 commit b7efe52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ useInstance provides a function you can call to force an update to occur.
5555

5656
```javascript
5757
function MyComponent() {
58-
const [instance, update] = useInstance(2);
58+
const [instance, update] = useInstance({ value: 2 });
5959
const double = useCallback(() => update((instance.value *= 2)), []);
6060
return <Widget value={instance.value} setValue={setValue} double={double} />;
6161
}

0 commit comments

Comments
 (0)