0.7.0
Features:
placeholder
is now optional
This is motivated by the fact that more advanced placeholder strategies do not even put the placeholder inside the image, but rather use a background (or placeholder) that the image is overlaid upon. The placeholder component is intended to be a "faster" solution for those cases where you do not have any kind of intrinsic (box preserving the aspect ratio) component.
Fixes:
- Optional properties are properly marked as such in the types
Breaking:
- The
({cls})
render prop argument has been removed
The cls property was not adding much, since we are not using it
as a hook for styling in the library. There is an argument that
we could use it for fallbacks, but that requires the user to
set the style tag anyway. Thus, it is best to leave it undefined.
It also bloated the syntax quite a bit, with a mess of squgglies
that can easily be messed up; JSX prop, arrow function, and then
destructuring.{({cls}) => ... }
vs{() => ..}
. I think this
is more convenient for people to use, especially weighed against
the lack of benefit to the library.