Fork me on GitHub
#cljsrn
<
2017-02-15
>
viveke05:02:20

How can i navigate from one page to another page in clojurescript using react native ?

pesterhazy08:02:24

You need to use a Navigator component

pesterhazy08:02:37

It's a bit tricky to use

viveke09:02:43

Can you please share an example code ?

viveke09:02:38

I want to from one activity to another activity.

pesterhazy09:02:50

then you need to translate that to cljs

viveke09:02:16

Do you have any sample code in cljs ?

tianshu09:02:25

@viveke basically React Native is all in one activity, if you want go to another activity, that's native part work I think.

tianshu09:02:51

You can't simply do that in pure JS or CLJS.

viveke09:02:08

@doglooksgood I am using closure script to build mobile application

ejelome09:02:18

oh, that would be wonderful! thanks @pesterhazy

viveke10:02:52

@ejelome @pesterhazy @doglooksgood thanks for that help . I shall follow the links and get back to you all..

pesterhazy10:02:24

good job on putting the example repo up, I'm sure that will help people in the future

ejelome10:02:53

pesterhazy: hi, thanks for the that, minor correction on the name, it's ejelome not elelome, thanks again! šŸ™‚

ejelome10:02:02

great! thanks @pesterhazy šŸ™‚

tianshu10:02:22

@ejelome Is there any example for RefreshControl in it? I met some problem with reagent and RefreshControl. I'm not sure about why it not work. IMO the reason may be Reagent component is not equivalent to React component(Reagent has its own wrapper).

ejelome10:02:08

might be persistentvector stuff but @pesterhazy is the expert on that one

tianshu10:02:20

@pesterhazy do you have experience with RefreshControl?

pesterhazy10:02:08

oops, fixed the typo

pesterhazy10:02:19

you should be able to edit the wiki as well

pesterhazy10:02:59

if you have some example code, we can have a look

ejelome10:02:21

alrighty! thanks @pesterhazy, appreciate it šŸ˜„

tianshu10:02:40

reproducing the issue is quite easy, I'll try to create a repo for this.

viveke10:02:07

@ejelome I saw in few source code they have used 'dispatch' keyword.

viveke10:02:43

is your sample code done using re-natal build tools

ejelome10:02:00

that's using re-frame, don't really need it for understanding the navigator

viveke10:02:56

I am using re-natal as build tool

ejelome10:02:03

yes, the only stripped portion was re-frame, still the normal way of doing things

viveke10:02:17

reagent react native

ejelome10:02:35

yes, same tools, except re-frame (it's another learning to be done, but will update that if free time kicks in :D)

ejelome10:02:29

actually, re-frame is still there, it's just that it's not imported and used, but only reagent so it will not be that difficult to connect re-frame stuff later on

viveke12:02:19

Hi Everyone, I am a android mobile application developer. I am interested in learning "clojurescript react native " using re-natal build tools. Can anyone suggest to learn from the scratch ?

viveke15:02:24

Can anyone refer books to read clojurescript react native ?

savelichalex15:02:04

@viveke books? don't think so šŸ˜„ I can refer book just about react native, without cljs)

ejelome20:02:54

there isn't really any re-natal learning material from scratch because it's just a cljs bootstrap (boilerplate, correct me if I'm wrong) for react native

raspasov20:02:02

@viveke nothing that Iā€™m aware of in terms of books. The good news is that itā€™s all ClojureScript -> JavaScript interop and everything ā€œjust worksā€ (assuming youā€™re already familiar with cljs -> js interop in general)

vikeri20:02:01

@ejelome After you get the setup going, learning ClojureScript with React Native is 99% learning om/re-frame and ā€œvanilla" React Native.

ejelome21:02:31

that's right, so the learner must at least have a grasp on both js and cljs before diving to re-natal, although you can somehow survive without re-frame if using reagent6 (as one of the bootstrap argument)

seantempesta21:02:55

@viveke: For what itā€™s worth, I taught myself Clojurescript by building a React Native app. And I had never done app development before. It wasnā€™t easy, but Iā€™m glad Iā€™ve stuck with it.