Skip to content

Commit 7daeb17

Browse files
committed
fix: update useTick isEnabled typedef and readme
1 parent 60dd9ff commit 7daeb17

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ import { useTick } from '@pixi/react'
359359
const MyComponent = () => {
360360
const [isEnabled, setIsEnabled] = useState(false)
361361

362-
useTick(() => console.log('This will be logged on every tick as long as `isEnabled` is `true`'), )
362+
useTick(() => console.log('This will be logged on every tick as long as `isEnabled` is `true`'), isEnabled)
363363

364364
return (
365365
<sprite onClick={setIsEnabled(previousState => !previousState)}>

src/typedefs/UseTickOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface UseTickOptions<T>
99
context?: T
1010

1111
/** @description Whether this callback is currently enabled. */
12-
isEnabled?: true,
12+
isEnabled?: boolean,
1313

1414
/** @description The priority of this callback compared to other callbacks on the ticker. */
1515
priority?: number

0 commit comments

Comments
 (0)