Skip to content

Commit 0f8db95

Browse files
authored
Merge pull request #568 from maliut/beta
fix: update `useTick` `isEnabled` typedef and readme
2 parents 2078af0 + 7daeb17 commit 0f8db95

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
@@ -284,7 +284,7 @@ import { useTick } from '@pixi/react'
284284
const MyComponent = () => {
285285
const [isEnabled, setIsEnabled] = useState(false)
286286

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

289289
return (
290290
<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)