switz / driver

🏁 A typescript package for declarative finite states and commonly derived values - zero dependencies, fully typed, & framework agnostic
https://npmjs.com/package/@switz/driver
MIT License
114 stars 1 forks source link

Add memoization #2

Open switz opened 1 year ago

switz commented 1 year ago

Would be nice to memoize the library, hopefully with minimal bundle size increase

switz commented 1 year ago

Memoizing via state keys seems like enough, but if flags isn't pure then it'll break. Maybe worth adding a deps array like useMemo.

switz commented 6 months ago

Would also be nice if the library was lazier in its evaluation rather than immediately parsing all derived objects.