Errors when Running from Script Src
See original GitHub issueI’m building a photo slideshow component, and I’d like to animate each photo in using variations of scale, translateX, translateY, and opacity. So your component looks perfect!
The page is created without a build pipeline, so I’m including your script using unpkg. I’ve worked through several errors already, but I’m stuck with these three errors. The page works without your animate library (sans animations of course) and now I’m not sure what the problem might be. Seems like it should all work.
Here’s how I’m importing your library, pulling in react-transition-group
as a dependency for your library.
<script src="https://unpkg.com/react-transition-group@2.2.0/dist/react-transition-group.min.js"></script>
<script src="https://unpkg.com/react-simple-animate@1.7.2/lib/animate.js"></script>
And here’s how I’m using your library.
const Photo = ({src,questCode}) => {
return (
<div className="photo-container">
<Animate
startAnimation={true}
startStyle={{"transform":"scale(0.5)"}}
endStyle={{"transform":"scale(1)"}}
durationSeconds="0.3"
easeType="linear">
<img key={questCode} className="photo" src={src} />
</Animate>
</div>
)
}
Here’s the source of the entire file, just unzip the html page into a folder then run python -m SimpleHTTPServer
in that folder to view it using a webserver…
slideshow.html.zip
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
sorry mate, can’t figure it out. you may want to post the question on stack overflow?
hey @AmirinNS, i haven’t spend too much time without using a build tool (eg. webpack hence create react app works)… i may take a look at it, once i am complete with incoming hooks.