Fork me on GitHub
#cljsrn
<
2016-09-16
>
surreal.analysis19:09:20

I’m trying to use an outside component, but I think I’ve messed something up. Component in question: https://github.com/jorilallo/react-native-emoji Command line things run:

re-natal use-component react-native-emoji
re-natal use-figwheel
Followed by restarting react-native and figwheel. The relevant code:
(def Emoji (js/require "react-native-emoji”))
(def emoji (r/adapt-react-class Emoji))

(defn app-root []
  … (other components here)

  [emoji {:name “coffee”}]
Currently failing with
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 `lub.ios.core.app_root`.

instantiateReactComponent
    instantiateReactComponent.js:86
instantiateChild
    ReactChildReconciler.js:30
… (I can paste more, but I wouldn’t think this is that important)

surreal.analysis19:09:12

Does anyone have an idea on what I’m doing wrong?

boorad20:09:21

@surreal.analysis are you using (clj->js args)?

surreal.analysis20:09:37

Hmm, where would I do that @boorad ?

surreal.analysis20:09:49

I haven’t seen that in any example so far

boorad20:09:12

(clj->js {:name “coffee}) maybe?

boorad20:09:05

I think I’ve also seen that error and cleared out my cache

boorad20:09:12

find "$TMPDIR" -name "react-*"   -exec rm -rf {} \;

surreal.analysis21:09:41

Trying lein prod-build now

surreal.analysis21:09:05

Same issue, which means that it should be a problem with my code, not my setup

boorad21:09:24

I’m out of suggestions - soaking in some Strangeloop

shader21:09:11

how do I use libraries from npm in the boot-react-native example app?

surreal.analysis21:09:53

Same @boorad ! If you get bored and think “I’d like to pair in person on a random person’s issues”, feel free to reach out 🙂

boorad21:09:32

@surreal.analysis I’m at the Union Station hotel, not sure what I’m doing tonight - may hack