Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 70e6e4d

Browse files
committed
Remove React code sample
1 parent a5d7a9f commit 70e6e4d

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

website/docs/guides/handle-events.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -145,42 +145,6 @@ In nodegui all these common QEvents are represented under an enum type: [WidgetE
145145

146146
You can subscribe to a QEvent like so:
147147

148-
```typescript
149-
import React from "react";
150-
import {
151-
Renderer,
152-
Text,
153-
Window,
154-
useEventHandler
155-
} from "@nodegui/react-nodegui";
156-
import { QLabelSignals, QMouseEvent, WidgetEventTypes } from "@nodegui/nodegui";
157-
158-
const App = () => {
159-
const textHandler = useEventHandler<QLabelSignals>(
160-
{
161-
MouseMove: (nativeEvt: any) => {
162-
const mouseEvt = new QMouseEvent(nativeEvt);
163-
console.log("mouseMoved at: ", { x: mouseEvt.x(), y: mouseEvt.y() });
164-
},
165-
[WidgetEventTypes.MouseButtonPress]: () => {
166-
console.log("mouse button was pressed");
167-
}
168-
},
169-
[]
170-
);
171-
172-
return (
173-
<Window>
174-
<Text mouseTracking={true} on={textHandler}>
175-
Move your mouse here
176-
</Text>
177-
</Window>
178-
);
179-
};
180-
181-
Renderer.render(<App />);
182-
```
183-
184148
```html
185149
<script lang="ts">
186150
import { onMount } from "svelte";

0 commit comments

Comments
 (0)