Updated packages and old React Pre-hooks code to modern syntax. #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found this package and when I tried to use it didn't work. After cloning and trying to npm install, one of the packages failed to install, probably because it was obsolete.
This package is a super clean way to turn HTML elements into Images in React, so I decided to give it some very deserved love.
Firstly I updated the package.json to the current newest versions of dependencies. After that, I refactored the code to the modern React syntax with hooks.
I also fixed a typing error on the Readme file that confused me when I tried to use the package first.
It's currently working for me, so I hope this helps some other people.
Note: Regarding the issue: #5 I am getting the same bug, especially if I have actual images inside my div element. Right now, I'm opening this PR to fix and update the package as it is, but if I have some extra time, I will try and fix that bug because I need it to work for a project of mine too.