lilactown / helix

A simple, easy to use library for React development in ClojureScript.
Eclipse Public License 2.0
631 stars 52 forks source link

fix glob import error in shadow-cljs" #2

Closed alidcast closed 4 years ago

alidcast commented 4 years ago

not sure if glob imports are expected to work, but here's my fix for #1 to get helix working with shadow-cljs and react native

lilactown commented 4 years ago

Like we talked about on Slack, I think following thheller's suggestion that we parameterize the Component class is the best option.

So we can change it to:

export function createClass(superclass, spec, statics) {
  let c = class HelixClass extends superclass {
 ...

and then in helix.core/create-component:

(helix.class/createClass react/Component spec statics)