react-snuggle
react-snuggle copied to clipboard
Refactor to use hooks and others features
Refactor
From now on, it uses hooks internally
onLoad event
Once a component has an image, we need to make sure that the image has loaded and to recalculate the grid. But it has been overwhelmed to manage the loading image out of the package, so in order to simplify the API, it would be a good idea to add events into the Snuggle.
Lazy-loading example
Solves #11 lazy loading issue.
@pbrandone could you please take a look?