Sha256: 17a6448c94ed1044702f76096c302c168e8014cd94a900fbdc1ae79adead0931

Contents?: true

Size: 725 Bytes

Versions: 9

Compression:

Stored size: 725 Bytes

Contents

module LucidFunc
  module Initializer
    def initialize
      self.JS[:native_props] = `{ props: null }`
      @native_props = `Opal.React.Component.Props.$new(#{self})`
      @app_store = `Opal.LucidComponent.AppStoreProxy.$new(#{self})`
      @class_store = `Opal.LucidComponent.ClassStoreProxy.$new(#{self})`
      @store = `Opal.LucidComponent.InstanceStoreProxy.$new(#{self})`
      event_handlers = self.class.event_handlers
      event_handler_source = self.class
      %x{
        for (var i = 0; i < event_handlers.length; i++) {
          self[event_handlers[i]] = event_handler_source[event_handlers[i]];
          self[event_handlers[i]] = self[event_handlers[i]].bind(self);
        }
      }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
isomorfeus-react-16.12.4 lib/lucid_func/initializer.rb
isomorfeus-react-16.12.3 lib/lucid_func/initializer.rb
isomorfeus-react-16.12.2 lib/lucid_func/initializer.rb
isomorfeus-react-16.12.1 lib/lucid_func/initializer.rb
isomorfeus-react-16.12.0 lib/lucid_func/initializer.rb
isomorfeus-react-16.11.4 lib/lucid_func/initializer.rb
isomorfeus-react-16.11.3 lib/lucid_func/initializer.rb
isomorfeus-react-16.11.2 lib/lucid_func/initializer.rb
isomorfeus-react-16.11.1 lib/lucid_func/initializer.rb