react-rails-mounter

1.0.1 • Public • Published

react-rails-mounter

This repo builds off of react_ujs.js in react-rails.

For those who are migrating off of the asset pipeline (into Webpack for example), it's often hard to manage mounting the React component tags generated by the react-rails gem. A few limitations/problems with the react_ujs.js driver:

  1. You can only load the driver via the asset pipeline.
  2. The driver expects your components to be exposed in the global scope.
  3. The driver may load and execute before your components are loaded.

This small library offers a way for you to mount your components completely off of the asset pipeline, at a time when the component-specific JS is loaded.

Package Sidebar

Install

npm i react-rails-mounter

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • xinranxiao