hyperstack-org / hyperstack-org/hyperstack

react-create-class message has changed

Aberta
#259 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
538
Forks
41
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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"
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.