Integrated grooved belt with npm components

I had a problem installing this plugin https://github.com/troybetz/react-youtube and use it in the js.cjsx response component. So I go step by step with this tutorial http://blog.arkency.com/2015/04/bring-commonjs-to-your-asset-pipeline/ But now, how can I enable and use the response-youtube component in the file js.cjsx? I run npm initand npm install react-youtube --savebefore. My application.js.coffee

#= require jquery
#= require jquery_ujs
#= require turbolinks
#= require jquery
#= require bootstrap-sprockets
#= require alert
#= require react
#= require react_ujs
#= require components
#= require_tree .

React = require('react')

How to do it?

+4
source share

Source: https://habr.com/ru/post/1626551/


All Articles