Fork me on GitHub
#cljsrn
<
2017-12-09
>
mv00:12:42

@seantempesta I reinstalled the app in the simulator, but no dice

seantempesta00:12:35

@mv did you try changing the registerComponent to Expo’s?

mv00:12:47

Yea, no change

danielneal14:12:43

You also need to change the call in figwheel-bridge.js

danielneal14:12:57

should become (I think)

function startApp(appName, platform, devHost) {
    expo.registerRootComponent(figwheelApp(platform, devHost));
}

danielneal14:12:10

The only other thing with fonts that you sometimes need to do is call Font.loadAsync

danielneal14:12:37

and wait for it to be loaded before rendering the app

danielneal14:12:16

but I'm 90% sure that the error that you saw was because of the registerrootcomponent call

mv01:12:03

Just to be sure, this is how I should do it?

mv01:12:07

(defonce Expo (js/require "expo"))

mv01:12:27

(defn init []
  (dispatch-sync [:initialize-db])
  (.registerRootComponent Expo #(r/reactify-component app-root)))

jiangts05:12:36

hi, I’m new to the exponent template for CLJS

jiangts05:12:58

and almost everything is working surprisingly smoothly, so thanks for all the great work!!

jiangts05:12:18

my problem is that I’m trying to run it on an actual device now. Can this be done with figwheel?

jiangts05:12:54

I changed the .expo/settings.json to "hostType": "LAN"

jiangts05:12:59

and I’m getting the error:

jiangts05:12:01

[exp] Network request failed
- node_modules/react-native/node_modules/whatwg-fetch/fetch.js:441:29 in onerror
- node_modules/event-target-shim/lib/event-target.js:172:43 in dispatchEvent
- ... 8 more stack frames from framework internals

jiangts05:12:22

using localhost doesn’t work, and it seems that figwheel doesn’t support tunnel

jiangts05:12:32

anybody gotten this to work?

mv07:12:43

I’m seeing the usage of :> a lot in example code, but I can’t find any documentation on what that operator does…

mv07:12:17

Also somewhat confused as to the difference between r/adapt-react-class and just calling aget on the ReactNative module

jiangts07:12:53

pretty sure that lets you use a native component. Have you tried running cljs expo on a device with figwheel?

jiangts07:12:03

if so, would love to learn how you got that working

jiangts07:12:25

the stacktrace showing on my iOS device when trying to run an exponent project on a real device using figwheel is

Network request failed

onerror
    fetch.js:441:29
dispatchEvent
    event-target.js:172:43
setReadyState
    XMLHttpRequest.js:548:29
__didCompleteResponse
    XMLHttpRequest.js:381:25
emit
    EventEmitter.js:182:12
__callFunction
    MessageQueue.js:306:47
<unknown>
    MessageQueue.js:108:26
__guard
    MessageQueue.js:269:6
callFunctionReturnFlushedQueue
    MessageQueue.js:107:17

jiangts08:12:37

I found the issue -- I had accidentally generated an empty .lan-ip early on...