I'm using react.rb in my project, And I want to use bootstrap too. I found the React-Bootstrap,but don't know how to use it in react.rb.
How to use React-Bootstrap in react.rb
183 views Asked by 贾延平 At
2
There are 2 answers
0
On
There is a new way of doing this, simply add
require 'reactrb/auto-import' to components.rb then all JS libraries that are required will be automatically imported into the Ruby namespace so after that you can access the JS components directly. See an example here: https://github.com/barriehadfield/reactrb-showcase#working-with-react-bootstrap
Thanks to @catmando share the answer.
First, define a wrapper:
Then, using it like this