hyperstack-org / hyperstack-org/hyperstack

react-create-class message has changed

Đang mở
#259 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
538
Fork
41
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

looks like react fixed a little bug. Used to be you required `'react-create-class'` now its the more expected `'create-react-class'` (and they even give a nice warning if you try to require this.)

Our code also checks and is using the old `react-create-class` in the error message.

```text
--- a/ruby/hyper-component/lib/hyperstack/internal/component/react_wrapper.rb
+++ b/ruby/hyper-component/lib/hyperstack/internal/component/react_wrapper.rb
@@ -64,7 +64,7 @@ module Hyperstack
end

def self.create_native_react_class(type)
- raise "createReactClass is undefined. Add the 'react-create-class' npm module, and import it as 'createReactClass'" if `typeof(createReactClass)=='undefined'`
+ raise "createReactClass is undefined. Add the 'create-react-class' npm module, and import it as 'createReactClass' from 'create-react-class'" if `typeof(createReactClass)=='undefined'`
raise "Provided class should define `render` method" if !(type.method_defined? :render)
render_fn = (type.method_defined? :_render_wrapper) ? :_render_wrapper : :render
# this was hashing type.to_s, not sure why but .to_s does not work as it Foo::Bar::View.to_s just returns "View"
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.