How to use jquery in non-react javascript on rails? -


i've incorporated react_on_rails (not react-rails) gem rails 4.2 code base.

i want introduce new react components app has fair amount of javascript code.

i ran "hello world" generator react on rails which, among other things, commented out //= require jquery line application.js -- result of pre-existing coffeescript (which depended on jquery being present) no longer works. new generated demo hello world react components work.

when comment out added //= require vendor-bundle , //= require app-bundle lines application.js , add in //= require jquery lines -- opposite happens, react components stop working pre-existing coffeescript works again.

my question -- how set things both work? is, new react components work, , pre-existing coffeescript (that relies on jquery) works well.

thanks in advance!

i haven't used generator, i'm not sure contains. have react-rails gem , jquery working in bunch of apps, here's imports like;

application.js

//= require jquery //= require react //= require jquery_ujs //= require react_ujs 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo