Skip to content
This repository was archived by the owner on Mar 27, 2019. It is now read-only.

Building better components

visionmedia edited this page Oct 27, 2012 · 18 revisions

Retina support

Any component that uses Canvas should utilize autoscale-canvas for retina support without the user doing this manually. However if the user is in charge of the canvas, and you are simply drawing to it, delegate this task to the user. An example of this is the canvas progress indicator component.

Modularity

When an aspect of a component may be useful to others, consider writing that as a component as well. For example both the popular "piecon" and "tinycon" favicon manipulation libraries have their own code for changing the favicon dynamically via canvas (and more specifically a data uri). I've re-written these libraries as piecon and noticon, both sharing favicon to perform the change.

Clone this wiki locally