Fork me on GitHub

Has anyone used in an app with re-frame? The docs say you can dispatch navigation events, and there’s an example, but I’m having trouble following the example - it still uses navigate directly, and while there are events that reset the routing state, I can’t see exactly how they interact. If anyone has any examples of this, I’d be much obliged. (Are there newer/different RN navigation libs?)

Oliver George00:05:35

I'm not familiar with it but the code is clean. Seems like a high quality library.


for sure - i'm just slow on the uptake

Oliver George00:05:06

Lots of things to cut yourself on in the cljsrn space


thanks for that link! meant to bookmark that before...

Oliver George00:05:33

I'll try and keep polishing it / fleshing it out over the next few weeks.

Oliver George00:05:38

Feedback welcome


@hoopes We’re using it successfully but with an old version of react-navigation. I don’t think it works for newer versions of react-navigation.


Are you using the navigate function passed in with props, or dispatching an event to change route (from anywhere)? Thanks for the reply!


Sorry for late response, we use the built in dispatch events through re-frame


Hey, thanks for the response (and sorry for my even later response) - can you share what's in your event handlers? I'd love to be able to just dispatch a routing change from anywhere, but I'm not sure what to call to make it happen. Are you also storing your routing state in the app-db? Thanks very much!


@U0AU4CPTN... also, sorry for the @-notification, i hadn't seen this, and wasn't sure if you'd get notified of my response. If that's super annoying bad slack etiquette, I apologize!


We keep the navigation state as a js object in the re-frame state. Ugly, but works


I’m not sure this is the best solution for navigation going forward though


#hero - thanks man, i greatly appreciate this. i'm just learning cljs->rn, so maybe someday there will be something better, but by then, i can throw away what i'm learning on right now. thanks again!