Skip to content

Commit

Permalink
docs: change useResource to useState in readme (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
Trufi committed Nov 13, 2021
1 parent ca8bc08 commit 62ee36f
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

1 comment on commit 62ee36f

@vercel
Copy link

@vercel vercel bot commented on 62ee36f Nov 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.