Closed mustofa-id closed 1 year ago
https://github.com/maciekgrzybek/svelte-inview/blob/b190e9f10753f611a72f02cd0e38671bdab652d0/src/inview.ts#L85-L92
This is likely due to having to wait for the Svelte microtask to complete. I think it's better to use tick().
await tick() node.dispatchEvent(createEvent<LifecycleEventDetails>('init', { observer, node }));
Yes, that sounds like a great idea :) Would you like to add a PR for that? :)
Fixed :) Thanks for the solution @mustofa-id
https://github.com/maciekgrzybek/svelte-inview/blob/b190e9f10753f611a72f02cd0e38671bdab652d0/src/inview.ts#L85-L92
This is likely due to having to wait for the Svelte microtask to complete. I think it's better to use tick().