We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a282b6f commit eef5f5fCopy full SHA for eef5f5f
1 file changed
example/src/pages/QuickStart.tsx
@@ -41,24 +41,24 @@ export default function QuickStart() {
41
);
42
43
useEffect(() => {
44
- setHealth?.(9);
+ setHealth(9);
45
}, [setHealth]);
46
47
const handleTakeDamage = () => {
48
- if (health !== undefined && setHealth) {
+ if (health !== undefined) {
49
setHealth(health - 7);
50
riveViewRef?.play();
51
}
52
};
53
54
const handleMaxHealth = () => {
55
- setHealth?.(100);
+ setHealth(100);
56
57
58
59
const handleGameOver = () => {
60
- setHealth?.(0);
61
- gameOverTrigger?.();
+ setHealth(0);
+ gameOverTrigger();
62
63
64
0 commit comments