Skip to content

Commit

Permalink
docs: change useResource to useState in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Trufi committed Nov 13, 2021
1 parent ca8bc08 commit 420e142
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ Drei currently exports OrbitControls [![](https://img.shields.io/badge/-storyboo
Every control component can be used with a custom camera using the `camera` prop:

```jsx
const myCamera = useResource()
const [camera, set] = useState()

return (
<>
<PerspectiveCamera ref={myCamera} position={[0, 5, 5]} />
<OrbitControls camera={myCamera.current} />
<PerspectiveCamera ref={set} position={[0, 5, 5]} />
<OrbitControls camera={camera} />
</>
)
```
Expand Down

0 comments on commit 420e142

Please sign in to comment.