Sha256: 5c5ebd300d706aafe73748dc195a53d3ebf0843af5df5eb94139c37f0697da7d
Contents?: true
Size: 476 Bytes
Versions: 13
Compression:
Stored size: 476 Bytes
Contents
module React module FunctionComponent module EventHandler def event_handler(name, &block) define_method(name) do |event, info| ruby_event = if `typeof event === "object"` ::React::SyntheticEvent.new(event) else event end block.call(ruby_event, info) end `self[name] = self.prototype['$' + name]` end end end end
Version data entries
13 entries across 13 versions & 1 rubygems