How to render using Hyperstack components in erb view
P粉301523298
P粉301523298 2023-08-16 15:03:45
0
1
421
<p>For example, I have an erb page that contains a lot of logic. I want to create user message on this page using Hyperstack. How can I render Hyperstack components on this erb page? renew: I know this is possible because the Hyperstack component is embedded in application.erb. </p>
P粉301523298
P粉301523298

reply all(1)
P粉884548619

I found the solution.

erb file:

<%= react_component('TestComponent') %>

hyperstack components:

class TestComponent < HyperComponent
  render(DIV) do
    '它运行正常'
  end
end
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!