sambernard / react-preload

Component to preload images before showing content
MIT License
148 stars 48 forks source link

Package failed after upgrading React to 16.x #36

Open EliasC10 opened 5 years ago

EliasC10 commented 5 years ago

I upgraded React from 15.x to 16.x today. Is it possible to use this package with React 16.x ? Im using React with Meteor and i get this Error when i try to Import the ImageHelper:

SyntaxError: import declarations may only appear at top level of a module

and a warning that i need React 15.x:

react-preload@0.6.0 requires a peer of react@^15.0.0 but none is installed.

NeXTs commented 4 years ago

I got this after upgrading to react v16

Uncaught SyntaxError: Cannot use import statement outside a module