Module: LucidComponent::Initializer

Defined in:
lib/isomorfeus_preact/lucid_component/initializer.rb

Instance Method Summary collapse

Instance Method Details

#initialize(native_component) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/isomorfeus_preact/lucid_component/initializer.rb', line 2

def initialize(native_component)
  @native = native_component
  @app_store = LucidComponent::AppStoreProxy.new(@native)
  @class_store = LucidComponent::ClassStoreProxy.new(self.class.to_s, @native)
  @props = `Opal.Preact.Props.$new(#@native)`
  @state = `Opal.Preact.State.$new(#@native)`
end