Module: React::Component

Defined in:
lib/react/component.rb,
lib/react/component/api.rb,
lib/react/component/base.rb,
lib/react/component/tags.rb,
lib/react/component/params.rb,
lib/react/component/class_methods.rb,
lib/react/component/props_wrapper.rb,
lib/react/component/dsl_instance_methods.rb,
lib/react/component/should_component_update.rb

Defined Under Namespace

Modules: API, ClassMethods, DslInstanceMethods, Params, ShouldComponentUpdate, Tags Classes: Base, PropsWrapper

Class Method Summary collapse

Class Method Details

.deprecation_warning(name, message) ⇒ Object



172
173
174
175
176
177
178
179
# File 'lib/react/component.rb', line 172

def self.deprecation_warning(name, message)
  @deprecation_messages ||= []
  message = "Warning: Deprecated feature used in #{name}. #{message}"
  unless @deprecation_messages.include? message
    @deprecation_messages << message
    React::IsomorphicHelpers.log message, :warning
  end
end

.included(base) ⇒ Object



167
168
169
170
171
# File 'lib/react/component.rb', line 167

def self.included(base)
  # note this is turned off during old style testing:  See the spec_helper
  deprecation_warning base, "The module name React::Component has been deprecated.  Use Hyperloop::Component::Mixin instead."
  base.include Hyperloop::Component::Mixin
end