Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.
/ hyper-rails Public archive

The project has moved to Hyperstack!! - One step integration of reactrb and associated gems with rails

License

Notifications You must be signed in to change notification settings

ruby-hyperloop/hyper-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

The project has moved to Hyperstack!! - One step integration of reactrb and associated gems with rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages