Fork me on GitHub
#cljsrn
<
2018-03-22
>
grounded_sage13:03:53

Any one able to help me get this last piece across the line. https://github.com/GroundedSage/Rum-RN4W-starter

grounded_sage13:03:14

I'm stuck here

(mount-app)
    (.registerComponent AppRegistry "main" (fn [] root-component-factory))
    (.runApplication AppRegistry "main" (. js/document (getElementById "app"))))

grounded_sage13:03:41

I'm doing React Native for Web. So I am not sure whether the mount-app part works here.

grounded_sage13:03:10

This is the error I have been getting

module$node_modules$react_native_web$dist$exports$AppRegistry$index.js:3 Uncaught TypeError: Cannot read property 'id' of undefined
    at Function.a.runApplication (module$node_modules$react_native_web$dist$exports$AppRegistry$index.js:3)
    at Object.starter$browser$start [as start] (starter.browser.js:78)
    at Object.starter$browser$init [as init] (starter.browser.js:85)
    at (index):10

grounded_sage14:03:40

The mounting part I was following this https://glitch.com/edit/#!/react-native?path=src/index.js:7:42 and the Exponent template or Rum @roman01la

pesterhazy16:03:33

what error are you seeing @grounded_sage?

grounded_sage16:03:14

Code has been changed to look like this

(do
    (mount AppRoot)
    (.registerComponent AppRegistry "app" (fn [] root-component-factory))
    (.runApplication AppRegistry "app" #js{:rootTag (. js/document (getElementById "root"))}))

pesterhazy16:03:06

what's mount?

pesterhazy16:03:55

seeing it the code

pesterhazy16:03:02

sorry, I don't know anything about Rum

pesterhazy16:03:38

you're not making things easier for yourself by using multiple unusual pieces (RNW, shadow-cljs, Rum)

pesterhazy16:03:48

start with just plain React if you're familiar with that

pesterhazy16:03:55

also no advanced compilation

grounded_sage16:03:11

mount was the code I pulled in from re-natal support.

grounded_sage16:03:58

All good I'll just stick to Reagent I think. Rum is more work than it is worth to make it work. I thought I was really close with using the other code from RN templates.

pesterhazy16:03:57

for all I know Rum may be great for this, but it requires a good understanding of all the components