Skip to content

Commit

Permalink
docs: remove reference to myMesh ref (#3405)
Browse files Browse the repository at this point in the history
I don't think it's required for these simple examples.
  • Loading branch information
danab authored Dec 4, 2024
1 parent e408d4e commit 261ee12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/events-and-interaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ From this we can see that what we need to do is use the old `onClick` event we u
Let's add it then:

```jsx
<mesh onClick={() => alert('Hellooo')} ref={myMesh}>
<mesh onClick={() => alert('Hellooo')}>
<boxGeometry />
<meshPhongMaterial color="royalblue" />
</mesh>
Expand All @@ -52,7 +52,7 @@ const [active, setActive] = useState(false)
After we have this we can set the scale with a ternary operator like so:

```jsx
<mesh scale={active ? 1.5 : 1} onClick={() => setActive(!active)} ref={myMesh}>
<mesh scale={active ? 1.5 : 1} onClick={() => setActive(!active)}>
<boxGeometry />
<meshPhongMaterial color="royalblue" />
</mesh>
Expand Down

0 comments on commit 261ee12

Please sign in to comment.