I'm super happy and impressed with shadow-cljs, it has radically improved 
my workflow and deployments, and exposed the npm universe without 
ballooning my js files...so, thanks very much to Thomas Heller,

I'm having an issue with react-window interop.

I'm successfully importing and using several 3rd party npm modules.  It's 
just this one that is not working.

I keep getting the error:  Invariant Violation: "Element type is invalid: 
expected a string (for built-in components) or a class/function (for 
composite components) but got: object. Check the render method of `List`."

I'm using re-frame and shadow-cljs, and the following code to initialize:

...
(:require
    [reagent.core :as reagent]
    ["react-window" :refer [FixedSizeList]]
...

(defn render [props]
  (reagent/as-element [:div "hey"]))

(defn fixed-size-list []
  (react/create-element
    FixedSizeList
    {:height 400 :width 300 :itemSize 46 :itemCount 200}
    render))

but always get the error above.  FixedSizeList is refered and available 
similar to other components.  As the error says, the problem is in the 
render of list.

I've tried render returning plain hiccup, reagent elements, react elements, 
and react classnames as strings, and for some reason the render fn in 
clojurescript is not valid as in the javascript examples.

This same general approach is working elsewhere for 3rd part components, 
but this is the first time I'm passing a function in as the body of the 
component, rather than as a value on the property map.

Any insights are greatly appreciated.

Scott.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojurescript/1c6739d1-84e4-4a1d-8ecd-34477ef92b33%40googlegroups.com.

Reply via email to