-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the problem
I have a Component that renders stuff based of values inside a svelte-store. I now need to execute some code after svelte is done rendering after the underlying data has changed. Currently I have to use setTimeout(()=>{ <the code> },0) which works, but seems like a very hacky way. It would be neat to be able to register a function which is being called every time parts of the component are finished rendering.
Describe the proposed solution
Lets assume there is a Component that accepts data and renders the data via the {@each} blocks
The Callback could be registered like this:
<SomeComponent {data} on:renderfinish={doSomething} />
Whenever data changes, which causes SomeCompnent to render differently doSomething should be called after svelte is done rendering
Importance
would make my life easier