Slava
Slava

Reputation: 27

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.

Upvotes: -2

Views: 33

Answers (1)

Slava
Slava

Reputation: 27

I found solution.

erb file:

<%= react_component('TestComponent') %>

hyperstack component:

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

Upvotes: 0

Related Questions