lib/reactrb/auto-import.rb in hyper-react-0.11.0 vs lib/reactrb/auto-import.rb in hyper-react-0.12.0
- old
+ new
@@ -15,18 +15,13 @@
_reactrb_original_const_missing(const_name)
rescue StandardError => e
React::NativeLibrary.import_const_from_native(Object, const_name, true) || raise(e)
end
- def method_missing(method_name, *args, &block)
- method = method_name.gsub(/_as_node/, '') # remove once _as_node is deprecated.
+ def method_missing(method, *args, &block)
component_class = React::NativeLibrary.import_const_from_native(self, method, false)
_reactrb_original_method_missing(method, *args, &block) unless component_class
- if method == method_name
- React::RenderingContext.render(component_class, *args, &block)
- else # remove once _as_node is deprecated.
- React::RenderingContext.build_only(component_class, *args, &block)
- end
+ React::RenderingContext.render(component_class, *args, &block)
end
end
end
end