freiksenet / react-kinetic

HTML5 Canvas via KineticJS using React.
http://freiksenet.github.io/react-kinetic/
MIT License
66 stars 7 forks source link

Don't use synchronous require #3

Closed edwinm closed 10 years ago

edwinm commented 10 years ago

In your code you use require, for example:

var ReactKinetic = require('./src/ReactKinetic');

This is synchronous code, which is very bad for performance and is discouraged to use in production code.

Please use an asynchronous loader like requirejs.

http://requirejs.org/

freiksenet commented 10 years ago

react-kinetic is using CommonJS, not AMD modules. I am not aware of any performance problems from using CommonJS require this way. This is how they do it in, for example, React.