Skip to content

Commit b922d76

Browse files
shubhamzanwara7ul
authored andcommitted
fix: moving the demo hook inside the component (#119)
1 parent cfb79ce commit b922d76

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/demo.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ const items = [
2121
{ text: "world" }
2222
];
2323

24-
const handler = useEventHandler<QPushButtonSignals>(
25-
{
26-
clicked: clicked => {}
27-
},
28-
[]
29-
);
3024
const App = () => {
25+
const handler = useEventHandler<QPushButtonSignals>(
26+
{
27+
clicked: clicked => { console.log("clicked"); }
28+
},
29+
[]
30+
);
3131
return (
3232
<Window>
3333
<View style={containerStyle}>
@@ -36,10 +36,11 @@ const App = () => {
3636
<Button style={buttonStyle} text={"World"} />
3737
</View>
3838
<ComboBox items={items} />
39+
{/* commenting this out while I still figure out the error;
3940
<AnimatedImage
4041
style="border: 1px solid blue; flex:1;"
4142
src="/Users/atulr/Project/nodegui/nodegui/src/lib/QtGui/__tests__/assets/fine.gif"
42-
/>
43+
/> */}
4344
</View>
4445
</Window>
4546
);

0 commit comments

Comments
 (0)