lib/hyperstack/internal/component/class_methods.rb in hyper-component-1.0.alpha1 vs lib/hyperstack/internal/component/class_methods.rb in hyper-component-1.0.alpha1.1
- old
+ new
@@ -2,15 +2,27 @@
module Internal
module Component
# class level methods (macros) for components
module ClassMethods
+ def create_element(*params, &children)
+ ReactWrapper.create_element(self, *params, &children)
+ end
+
+ def insert_element(*params, &children)
+ RenderingContext.render(self, *params, &children)
+ end
+
def deprecation_warning(message)
Hyperstack.deprecation_warning(self, message)
end
def hyper_component?
true
+ end
+
+ def mounted_components
+ Hyperstack::Component.mounted_components.select { |c| c.class <= self }
end
def param_accessor_style(*args)
props_wrapper.param_accessor_style(*args)
end