reactjs - Need a workaround for Adobe SnapSVG-animator running in React.js -
snapsvg extension adobe animate.cc 2017 able create interactivity , animations web. i'm trying use exported snapsvg adobe animate.cc project in react js webapplication.
what did far
published html file snapsvg project(animate.cc 2017)
copyed custom json file created snapsvg project in animate.cc in react app.
installed snapsvg npm install in react app.
imported js file copyed html publication created animate.cc importing code. ( snapsvg-animator isn't available in npm)
the custom json file animate.cc/snap svg project loaded async , added svganim(snapsvganimator.min.js) function object create svg animation in de browser.
the code
import axios 'axios'; import snapsvg 'snapsvg'; import { svganim } './snapsvganimator.min.js'; let jsonfile = "circle.json", responsetype: 'json'; componentdidmount(){ axios.get(jsonfile) .then(response => { const json = response.request.responsetext; const animatedsvg = new svganim(json); }); }
problem
the snapsvganimator.min.js creates warnings , errors when it's imported in jsx file. looks going wrong compiling these code.
Comments
Post a Comment