You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An additional parameter (jquery) can be provided to react-events. This parameter is only required if using DOM event bindings and may be left out otherwise.
Hi,
when using react-events with browserify, I get the exception
ReferenceError: $ is not defined
The reason is simple: the code assumes that $ is part of the global namespace. With browserify you rely on explicit require statements.
Workaround
Load query into the global namespace for example by adding a script tag in the web page.
Solution
Can the function(React) method be changed to function(React, $)
I could then change Mixins(React) to Mixins(React, jquery)
Sample code:
// could be
// var jquery = require('query');
// Mixins(React, jquery)
React.mixins.add('events', Events(React));
Best Regards
Sebastian
The text was updated successfully, but these errors were encountered: