StackOverflow 文档 Ruby on Rails 教程 使用 Hyperloop 将 React.js 与 Rails 集成 事件处理程序 事件处理程序 Created: November-22, 2018 # Event handlers are attached using the 'on' method class ClickMe < Hyperloop::Component render do DIV do SPAN { "Hello There" } A { "Click Me" }.on(:click) { alert('you did it!' } end end end 状态HTML 标签