Fork me on GitHub
#cljsrn
<
2017-03-01
>
seantempesta03:03:19

Has anyone written a CLJSRN compatibility library for react-navigation? I’m working on one now and just realized I might be reinventing the wheel.

seantempesta03:03:04

Also, I’m shocked that there is finally a reasonable navigation library. 🙂

seantempesta03:03:56

ah, just found re-navigate. I should have scrolled up first before asking.

vikeri03:03:23

@seantempesta Couldn’t get the tabs to integrate with re-frame properly though, so there’s still some work to be done on that front.

seantempesta04:03:08

@vikeri Yeah. Saw that. I'll work on it and will let you know if I find a solution.

vikeri04:03:50

@seantempesta Great! :thumbsup:

raspasov05:03:37

has anyone gotten react-navigation to work well with ClojureScript? I’m slightly skeptical to jump on yet another “navigation” bandwagon, esp. given the track record and ultimate destiny of all the previous navigation solutions around React/React Native in general

raspasov05:03:45

I guess I can expand my question to not only “can you get it to work” since the answer is almost always “yes”; the real question is: is the navigation abstraction presented by the latest navigation library/framework a good and ultimately flexible one so that it doesn’t paint you in a corner in a month, etc, etc

savelichalex06:03:34

@raspasov react-navigation is great, and much better for me then other navigators. I tried 3-4 navigators before

vikeri06:03:52

@raspasov I see your skepticism, and as I mentioned earlier I had some struggles with tabs, but other than that I’d say that this is the best navigation solution yet.

raspasov06:03:33

thanks for the feedback!

raspasov06:03:22

maybe I’ll allocate a few hours to explore it in more details

savelichalex06:03:00

@seantempesta I'm create my own wrappers around react-navigation too 🙂 Really I don't create a library, just wrap some methods that useful for me

savelichalex06:03:34

@vikeri What a problem with tabs?)

vikeri06:03:22

@savelichalex When I read the tab state from re-frame the tabs flicker when I try to click on them. Using re-frame state for stack-navigation works well. But for now I’m letting the library handle the tab navigation and just attached a listener that mirrors it to my re-frame state. I’d prefer to manage the full state from re-frame though. Are you using re-frame or something else?

savelichalex06:03:10

Yeah, but I don't keep navigation state in re-frame

vikeri06:03:01

Ok, ýeah then it’s not an issue

savelichalex06:03:11

I tried this before but now for me it's just simplier to call navigation transition directly 🙂

savelichalex06:03:47

@vikeri Are you have an example with nav state in re-frame?

savelichalex06:03:35

oh, I got it. But I see you have problems with many navigators too. Last time I want to create navigation through state, but have problem, that each navigator have his own navigation object.

mozinator209:03:04

this is the way I use react-navigation: https://gist.github.com/mozinator/cb7076521f14cbbef861491fb74f92e2 its a total hack, but it works for me (tm)

savelichalex10:03:42

mozinator: oh man, please change txt to cljs, it's hard to read 🙂

savelichalex11:03:28

Anyway I'm also thought about keeping navigator in atom, for me this is not a hack )

mozinator211:03:54

ok, changed it

vikeri18:03:18

Good stuff, the reson I want to keep my nav in the state is because for example when we are debugging it’s quite elegant to just take a snapshot of the re-frame state and then import that somewhere else and see the app exactly as it was

savelichalex18:03:31

vikeri: sounds reasonable :thinking_face:

mozinator223:03:11

I agree with you about that and in the future I would like to have this functionality

jmf16:03:22

I gave up on react-navigation and went back to react-native-router-flux. I dont know that pushing for react-navigation makes a whole lot of sense today

pesterhazy18:03:50

I used the standard Navigator and thought it worked well enough (https://facebook.github.io/react-native/docs/navigator.html)

pesterhazy18:03:20

what are the main contenders theses days? The names are so similar

vikeri18:03:35

@pesterhazy React Navigation is the latest solution that seems to be coming from fb internally, but of some reason it’s in an external project… They have based it on the experience of ex-navigation(or) and NavigationExperimental.

pesterhazy18:03:07

ok so there's: - Navigator (and its close cousin NavigatorIOS): included with RN, janky imperative interface - NavigationExperimental: also included in RN, more functional but still has "experimental" in it name - ex-navigator: provided by exponent, a wrapper around Navigator with a better interface - ex-navigation: also by exponent, a successor (?) of ex-navigator - wix/react-native-navigation: an independent "native" navigator, iOS only so far - react-navigation: separate npm dep, fancy web site, built by FB team, currently marked as unstable

pesterhazy18:03:11

am I missing anything?

vikeri18:03:39

not to mention ex-navigat*ion*

pesterhazy19:03:05

so it's not forgotten, feel free to suggest better characterizations etc

vikeri19:03:20

:thumbsup:

vikeri19:03:35

Maybe also include ways to implement them in cljs?

vikeri19:03:14

@pesterhazy And add deprecation flags to those that are deprecated

mozinator219:03:42

before using react-navigation I used ex-navigation, which is actually pretty good

pesterhazy19:03:45

yeah but which ones are deprecated really?

vikeri19:03:16

I think both ex- ones are deprecated in favor of React Navigation

pesterhazy19:03:41

I'd love to add links to cljs wrappers

vikeri19:03:38

I didn’t see any updates, but there’s also https://github.com/aksonov/react-native-router-flux

vikeri19:03:49

I don’t know how well it would play with cljs though

pesterhazy19:03:08

@vikeri I've added your links

vikeri19:03:28

:thumbsup:

pesterhazy19:03:14

it's a really confusing field

pesterhazy19:03:31

who thought that react-navigation would be a good name?

vikeri19:03:29

Hahaha, I think they want to reuse it for web as well though...

pesterhazy19:03:53

yeah? that doesn't seem like a good idea to me 😞

pesterhazy19:03:27

react-dom and react-native should be treated as separate projects (learn once, write twice, or what was it?)

wojciech20:03:34

> yeah but which ones are deprecated really? As far as I know, all of them and react-navigation is the right way

wojciech20:03:01

It should be a stable state, meaning it shouldn't change (in the next 3 months...)