LottieFiles / dotlottie-web

Official LottieFiles player for rendering Lottie and dotLottie animations in the web. Supports React, Vue, Svelte, SolidJS and Web Components.
https://developers.lottiefiles.com/docs/dotlottie-player/
MIT License
191 stars 11 forks source link

refactor(solid): unnecessary `useStableCallback` #374

Closed moonlitgrace closed 3 weeks ago

moonlitgrace commented 1 month ago

Description

unlike react, solid natively tracks reactive dependencies and automatically handles updates, making useStableCallback redundant. (no need to memoize and stabilize functions explicitly).

the useStableCallback likely added some overhead too, the removal led to a decrease in the rendered bundle size by 0.35 KB (approximately 5.35%).

also ✅ Tested with example.

Type of change

Checklist

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 2475c12aa5085f0903a4eb4eaf500afd574fdfec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------------- | ----- | | @lottiefiles/dotlottie-solid | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR