Fork me on GitHub
#cljsrn
<
2021-05-14
>
Emi Gal00:05:56

Was wondering if someone could help me elucidate a mystery. I have a react native app that leverages shadow-cljs + expo. It's a re-frame / reagent / react native app. My components render correctly when I run the app in the browser, but I get a blank screen (and no errors) in the iOS simulator. Any ideas on what I might be doing wrong?

Emi Gal01:05:52

Fast Refresh is Disabled, btw.

pez06:05:04

Does the debugger have any messages that could give you a clue? What do you see in the inspector? I see the word “Modal” there as well. Is it a React Native Modal? They are great, but can be a bit tricky to get in control of.

dotemacs08:05:58

It could be an issue that is just style related and that it doesn’t show up correctly on the simulator. Maybe try to have just a simple component like Text and see if that renders OK first.

raspasov10:05:48

That is strange. When I run into super weird behavior like that, I go back to “first principles”. Comment out all your code and try to render just one element in the simulator. Does that work?

Emi Gal13:05:15

Thanks for “first principles” recommendation @U050KSS8M. Did that, and it turns out I was using a library (steroid.rn.navigation.core) that had its own reload function (create-navigation-container-reload). That clashed with shadow-cljs’s reload and was messing things up when on the simulator.

👍 3