From SVG to Canvas – A new way of building interactions

In this post, the author describes their experience of switching from SVG to Canvas, and how they wrote a new interaction handling system from scratch to simplify their existing interaction code. They discuss the problems with their previous React-based approach, and detail the goals they set for the new system, such as reducing code complexity, improving performance, and allowing for more complex interactions. The new system, called per-state InteractionHandlers, uses a behavior-centric approach rather than an element-centric one, which gives developers more control and allows for a cleaner, more maintainable codebase. The post concludes by discussing trade-offs and lessons learned from the switchover.

https://felt.com/blog/svg-to-canvas-part-2-building-interactions

To top