Repository is archived
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
This gem provide rails generators for reactrb
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 4.0.0
 Project Readme

Hyper-rails

Build Status Gem Version

Installation

This generator will install HyperReact and Opal in Rails 4.x or 5.x

In your Gemfile

gem "hyper-rails"

then

bundle install
rails g hyperloop:install
bundle update

This generator can also create HyperReact components.

HyperReact Components

rails g hyperloop:component Home::Clock

Which will make the component Home::Clock in app/views/components/home/clock.rb

You can render a component directly from a controller:

class HomeController < ApplicationController
  def clock
    render_component
  end
end

Or from a view:

<%= react_component('Home::Clock') %>

See ruby-hyperloop.io for further examples.