Closed thom4parisot closed 9 years ago
What would be the best way for individual images to subscribe to resize events without keeping reference to these elements?
resize
Probably by subscribing to the onImagesReplaced on Imager.ready.
onImagesReplaced
Imager.ready
var Imager = require('imager.jsx'); var ResponsiveImage = Imager({ onResize: true }); React.createClass({ render: function(){ return ( <main> <header><ResponsiveImage src="..." alt="Site banner" /></header> <ResponsiveImage src="..." /> </main> ); } });
What would be the best way for individual images to subscribe to
resize
events without keeping reference to these elements?Probably by subscribing to the
onImagesReplaced
onImager.ready
.