How can I invoke functions responsively inside html markup? #12726
Unanswered
CNSeniorious000
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Can't you use the (Something like this should be done via events, so if there is none, I would recommend opening an issue in |
Beta Was this translation helpful? Give feedback.
3 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to run some function based on the state inside a large
{#each}
block, so the responsive values are not accessible in the component's<script>
tag.Here is how I implement it for now:
In the example above, the
focused
is a mutable state. I want to preload for the focused anchor element. I can't think of another way to do this.I really wonder how I can implement this more elegantly.
If you find the example above a bit confusing, in fact it is a minified example from here.
Beta Was this translation helpful? Give feedback.
All reactions