reactjsruby-on-railsrubyisomorphichyperstack

How i can render Hyperstack Component on erb view?


For example i have a erb page with many logic. I wanna create user messages on this page with Hyperstack. How i can render Hyperstack component on this erb Page? Upd: I know this is possible because the Hyperstack Component is embedded in aplication.erb.


Solution

  • I found solution.

    erb file:

    <%= react_component('TestComponent') %>
    

    hyperstack component:

    class TestComponent < HyperComponent
      render(DIV) do
        'Its works'
      end
    end