-
StackOverflow 文件
-
Ruby on Rails 教程
-
使用 Hyperloop 將 React.js 與 Rails 整合
-
回撥
# all react callbacks are supported using active-record-like syntax
class SomeCallBacks < Hyperloop::Component
before_mount do
# initialize stuff - replaces normal class initialize method
end
after_mount do
# any access to actual generated dom node, or window behaviors goes here
end
before_unmount do
# any cleanups (i.e. cancel intervals etc)
end
# you can also specify a method the usual way:
before_mount :do_some_more_initialization
end