reactjscreatejs

How to use createjs in reactjs


I'm wanting to import createjs into my reactjs app.
The createjs file i have is from https://code.createjs.com/

Im trying to import in my App.js file as import './lib/createjs.min';

However I get the error 'createjs' is no defined error.


Solution

  • You can add script tag for createjs in the index.html under public directory so that you can access the createjs globally instead of imported it in different places.

    <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
    

    You cannot import it like you have given.