Module: LucidComponent::Mixin

Defined in:
lib/isomorfeus_react/lucid_component/mixin.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/isomorfeus_react/lucid_component/mixin.rb', line 3

def self.included(base)
  base.include(::Native::Wrapper)
  base.extend(::LucidComponent::NativeLucidComponentConstructor)
  if on_browser? || on_ssr?
    base.extend(::LucidComponent::NativeComponentConstructor)
    base.include(::React::Component::Elements)
  elsif on_mobile?
    base.extend(::LucidComponent::ReactNativeComponentConstructor)
    base.include(::ReactNative::Component::Elements)
  end
  base.extend(::LucidPropDeclaration::Mixin)
  base.include(::React::Component::Api)
  base.include(::React::Component::Callbacks)
  base.include(::LucidComponent::Api)
  base.include(::LucidComponent::StylesApi)
  base.include(::LucidComponent::Initializer)
  base.include(::React::Component::Features)
end