Last active
December 16, 2023 05:02
-
-
Save PatrickJS/74e9d9c4b8b35dc720448891e278be98 to your computer and use it in GitHub Desktop.
how do you type qwik
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /TileTemplate.tsx | |
| 15:23 warning Using "onDragStart$" as an event handler, however functions are not serializable. | |
| Did you mean to wrap it in `$()`? | |
| Fix the type of onDragStart$ to be PropFunction | |
| Check out https://qwik.builder.io/docs/advanced/dollar/ for more details qwik/valid-lexical-scope | |
| 16:21 warning Using "onDragEnd$" as an event handler, however functions are not serializable. | |
| Did you mean to wrap it in `$()`? | |
| Fix the type of onDragEnd$ to be PropFunction | |
| Check out https://qwik.builder.io/docs/advanced/dollar/ for more details qwik/valid-lexical-scope |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Slot, component$, $ } from "@builder.io/qwik"; | |
| type Props = { | |
| onDragStart$?: () => void; | |
| onDragEnd$?: () => void; | |
| }; | |
| export const TileTemplate = component$<Props>( | |
| ({ onDragStart$, onDragEnd$ }) => { | |
| return ( | |
| <div | |
| draggable | |
| onDragStart$={$(onDragStart$)} | |
| onDragEnd$={$(onDragEnd$)} | |
| class="cursor-pointer text-center text-white" | |
| > | |
| <Slot /> | |
| </div> | |
| ); | |
| }, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Slot, component$, $ } from "@builder.io/qwik"; | |
| import type { PropFunction } from "@builder.io/qwik"; | |
| type Props = { | |
| onDragStart$?: PropFunction<() => void>; | |
| onDragEnd$?: PropFunction<() => void>; | |
| }; | |
| export const TileTemplate = component$<Props>( | |
| ({ onDragStart$, onDragEnd$ }) => { | |
| return ( | |
| <div | |
| draggable | |
| onDragStart$={onDragStart$} | |
| onDragEnd$={onDragEnd$} | |
| class="cursor-pointer text-center text-white" | |
| > | |
| <Slot /> | |
| </div> | |
| ); | |
| }, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Slot, component$, $ } from "@builder.io/qwik"; | |
| import type { QRL } from "@builder.io/qwik"; | |
| type Props = { | |
| onDragStart$?: QRL<() => void>; | |
| onDragEnd$?: QRL<() => void>; | |
| }; | |
| export const TileTemplate = component$<Props>( | |
| ({ onDragStart$, onDragEnd$ }) => { | |
| return ( | |
| <div | |
| draggable | |
| onDragStart$={onDragStart$} | |
| onDragEnd$={onDragEnd$} | |
| class="cursor-pointer text-center text-white" | |
| > | |
| <Slot /> | |
| </div> | |
| ); | |
| }, | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment