You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see you're just calling await onSubmit(), isn't that why this is undefined?
You are right, my mistake haha, I should do “await store.submit()”.
The weird thing is that this bug of mine, I have it for many months running in v1. I mean, although I recognize that it's my fault, anyway in v1 it works and in v2 it doesn't haha.
Which component is affected?
Qwik Runtime
Describe the bug
If a hook returns a useStore and a component$, and the useStore uses function to access “this”, the “this” is undefined.
Reproduction
https://stackblitz.com/edit/github-6f6maw-cm569smw?file=src%2Fhooks%2Ftest.tsx,src%2Froutes%2Findex.tsx
Steps to reproduce
If you click on the “submit” button, you will see an error, since the “this” in the “onSubmit” of the “useStore” is “undefined”.
On the other hand, if in the “useForm”, you remove the export of the “Form” component, the error disappears.
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: