mirror of
https://github.com/zhigang1992/react-three-fiber.git
synced 2026-04-30 05:15:29 +08:00
Update pitfalls.md
This commit is contained in:
@@ -79,7 +79,7 @@ Using state-managers and selected state is fine, but not for updates that happen
|
|||||||
```jsx
|
```jsx
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
|
|
||||||
// Assuming that x gets animated inside the store, triggering the component 60fps
|
// Assuming that x gets animated inside the store 60fps
|
||||||
const x = useSelector(state => state.x)
|
const x = useSelector(state => state.x)
|
||||||
return <mesh position-x={x} />
|
return <mesh position-x={x} />
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user