Fork me on GitHub
#cljsrn
<
2016-09-29
>
vikeri07:09:56

@coyotespike If you have the time I’d be happy to accept a pull request to re-navigate

vikeri07:09:10

I guess it’s about updating RN to 0.34?

pvinis09:09:31

in re-natal, how do i write a componentDidMount for a component?

savelichalex09:09:51

@pvinis see reagent/create-class

pvinis10:09:31

ah, so i dont just do a defn

pvinis10:09:44

so when i make a defn returning just a fn with the render stuff, is it the same as create-class with a :reagent-render, right?

pvinis10:09:31

one more thing.. how do people work with promises?

pvinis10:09:48

like getPhotos from the cameraroll gives back a promise

pvinis10:09:55

how do you work with that in cljs?

artemyarulin10:09:13

well, usual interop works well

(-> p (.then do-smth1)
      (.then do-smth2)
      (.catch on-error)

pvinis10:09:37

thanks. i will try that

pieterbreed10:09:56

Hi everyone, I just followed the instructions on presumably.ed/b-r-n.html and I'm getting an error on the boot inst step. The error is j.l.IllegalArgumentException: No such task (inst). Any ideas of how to track this down?

misha12:09:06

@pvinis big guys like Rich and Stu suggest/recommend to wrap promises with core.async

savelichalex12:09:07

@pvinis I'm also make macro for promises, will try to find it

pvinis12:09:34

thank you both

pvinis12:09:57

for now i will do it with artemyarulin’ suggestion

pvinis12:09:20

now i just need to figure out how to print out cljs objects in the console

pvinis12:09:27

so i can debug, and then im set

savelichalex12:09:47

This macro helps to not write .then and work like ->

pvinis12:09:50

i stop with a breakpoint, but i dont know how to run the repl while stopped

misha12:09:23

(js/console.log (pr-str obj))

pvinis13:09:57

nice. thats a bit nicer than just println

pvinis13:09:23

and of course list-view.. my eternal nemesis apparently..

pvinis13:09:30

i cannot make datasource work

pvinis13:09:11

i should remember to use clj->js and js->clj

savelichalex14:09:14

hm, I'm just use (enable-console-print!) and (print obj)

kt19:09:57

https://facebook.github.io/react-native/docs/slider.html any advice on converting the first example to om.next re-natal?

balint20:09:56

oops, i misread re-agent

balint20:09:30

not sure how it would differ in om.next, havent used that yet

kt20:09:06

thanks i'll take a look

kt20:09:50

also, that's for the sliderIOS, is it the same for the other slider?

kt20:09:34

figured it out from that, thanks @balint!