Allow q:args for extra arguments to event handlers #310
wmertens
started this conversation in
Proposals For Qwik
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
optimizing qrl creation
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
Proposed Solution / Feature
What do you propose?
The optimizer could rewrite
into
and Qwik Core would make sure to call the event handlers with
(event, target, ...qArgs)
.This also works with qwikloader because we use the core
_run
qrl to run handlers.Because now the handler doesn't capture scope directly, it can be moved up into module scope
This means that loops will no longer create a qrl object per item.
Also, because the qrl has no more scope, it can even be a sync qrl if it's short. That saves a module import, smaller bundlegraph etc.
Implementation
q:args
on _runLinks / References
No response
Beta Was this translation helpful? Give feedback.
All reactions