rsamec / react-binding

Data binding for react - bindToMixin
MIT License
47 stars 0 forks source link

Compatibility with browserify-shim #5

Open xpopov opened 8 years ago

xpopov commented 8 years ago

Hello!

I seem to having problem using react-binding with browserify-shim. I use gulp to bundle my app, and use this config:

"browserify-shim": { "jquery": "global:$", "react": "global:React", "react-dom": "global:ReactDOM", "react-bootstrap": "global:ReactBootstrap", "react-router": "global:ReactRouter", "react-binding": "global:ReactBinding", "react-input-color": "global:ReactInputColor" }

I include react-binding.js in index.html.

After all js is loaded in document, React app cannot find react-binding. It tries to do this in this code:

var _reactBinding = (typeof window !== "undefined" ? window['ReactBinding2'] : typeof global !== "undefined" ? global['ReactBinding2'] : null);

var _reactBinding2 = _interopRequireDefault(_reactBinding);

Do you know what is wrong and how to fix this?

rsamec commented 7 years ago

sorry, for big delay -> i upgraded browserify to generate react-binding -> try version 0.8.0