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
{{ message }}
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.
Now we can add the components to the view using <%= react_component ... %> and mount them by doing a dom query, then calling mount_components.
Typical in JS:
// fetch.js.erb$('#target_div').html("<%= escape_javascript(render partial: 'fetch') %>").mount_components();// fetch.erb contains our html code including 1 or more component mount points
In Ruby
Element['body'].mount_components# mount everything!
From opal you can call
Hyperloop.mount_all
or from js land itshyperloop_mount_all()
It will find all components with the data-hyperloop-mount data attribute, and the name of the component will be the attribute value. For example
will mount MyBigComponent at the DIV and pass it 'some data' as param1
The text was updated successfully, but these errors were encountered: