react-sinatra-ujs
v1.0.1
Published
Mounting components built with webpack
Downloads
139
Readme
react-sinatra-ujs
react-sinatra-ujs
mounts components built with webpack.
This is for react-sinatra
Install
npm i --save react-sinatra-ujs
Usage
Renders react component in your views
Add your react component in your views by using the react_component
helper.
<%= react_component('CommentBox', name: 'namusyaka') %>
Mount webpack bundled components
import { mountComponents } from './react-sinatra-ujs';
import { CommentBox } from './components/CommentBox';
mountComponents({ CommentBox });
License
The package is available as open source under the terms of the MIT License.