Open genox opened 10 months ago
Thank you for the hint! I will update the guide.
Wating for this upgrade too :)
Will update the guide and check the code next week. Its on my list.
@fabian-hiller do you have to make changes in the library or can it be fixed just by changing the way the library is invoked?
I need to look into this. Some people have reported runtime errors with the new Qwik version.
I need to look into this. Some people have reported runtime errors with the new Qwik version.
Using this at work—no runtime errors, just type errors when building the app.
I think I have fixed everything. I will release a new version soon.
v0.23.0 is available
@fabian-hiller I'm declaring ref like this for one of my components:
ref?: QRL<(element: Element) => void>;
Because I need to explicitly call ref
from an useTask$ context, but types are not compatible:
Types of property 'ref' are incompatible.
Type '(element: Element) => void' is not assignable to type 'QRL<(element: Element) => void>'.
Please try to remove QRL
:
ref?: (element: Element) => void;
If I remove QRL, the type error gets fixed in the Field, but breaks in the useTask$
When referencing "props" inside a different scope (useTask$), Qwik needs to serialize the value, however "props.ref" is a function, which is not serializable.
Ok. I will try to change the types to QRL<…>
.
v0.23.1 is available
@fabian-hiller everything compiles in my project now, thanks a lot!
Just upgraded to qwik 1.3.3 and it seems some types have been changed. A text input field component I based on https://modularforms.dev/qwik/guides/input-components throws TS errors for all defined FunctionProps.