Sha256: 14dbccc7df7bd174bbf7903ae2e6985e8aa0871335596cad1fd2ca8f1ade0134
Contents?: true
Size: 474 Bytes
Versions: 48
Compression:
Stored size: 474 Bytes
Contents
module React module Component module EventHandler def event_handlers @event_handlers ||= [] end def event_handler(name, &block) event_handlers << name %x{ self.react_component.prototype[name] = function(event, info) { #{ruby_event = ::React::SyntheticEvent.new(`event`)}; #{`this.__ruby_instance`.instance_exec(ruby_event, `info`, &block)}; } } end end end end
Version data entries
48 entries across 48 versions & 1 rubygems