Fork me on GitHub
#cljsrn
<
2017-09-23
>
Yoshiquest00:09:38

Hello, I've been working on a react native app with clojurescript, and wanted to add cljs-react-navigation to the project. The problem is that the stack navigator seems to (re-)render all of its screens at once, which is a problem since one of my screens records a video and the next one plays it back (so if the one that plays the video back tries to find a video before it gets recorded, bad things happen). Is there a way to organize screens in cljs-react-navigation so that they don't all get rendered at once?

Yoshiquest02:09:17

Seems like no one's on right now, I'll come back tomorrow.

raspasov05:09:46

@yoshiquest I’m sure people have different opinion about this but I would really evaluate if you need the react-navigation style approaches to managing your application or you can achieve a similar result in other ways

raspasov06:09:52

without being familiar with all the details of react-navigation (I tried to integrate it once though): it’s “alluring” to have a centralized and consistent approach for navigating your app… in theory… but when you really think about what it’s doing for you… it’s not all that much: - TabNavigator is just (condp = …) statement over some app state prop; - Drawer is… just a slideUp animation that can be implemented with native performance using something like https://github.com/oblador/react-native-animatable One thing that it’s doing for you is this: StackNavigation “controller” with excellent cross device performance and “native feel” - is your app going to be very View stack heavy? if your app has the structure of say, the iOS Settings, then yes… but if it’s more “feed-style” like Instagram then perhaps the stack is not so essential

misha10:09:32

* not react native

pesterhazy11:09:11

@bhauman how are your experiments with RN coming along?

bhauman19:09:23

@pesterhazy coming along very well thank you, I'm just about to submit a PR to re-natal

jeaye19:09:58

What does that PR entail?

jeaye19:09:32

Ah, this is the document error fix.

jeaye19:09:42

re-natal is, unfortunately, quite stagnant, even with some pretty glaring open issues.

bhauman19:09:36

@jeaye yes that and more

jeaye19:09:25

Awesome. 🙂

bhauman19:09:08

The figwheel-bridge.js in the above pull request should work great with Figwheel 0.5.14-SNAPSHOT

bhauman19:09:35

Please give it a try and record feedback here or in the PR

jeaye20:09:39

Badass. Will give it a shot if I can finish my work this weekend.

Yoshiquest21:09:30

I'm back. @raspasov I had no idea about react-native-animatable. Since all I wanted was the transitions between screens, I might take a look at that instead then. Thanks!