Fork me on GitHub
#cljsrn
<
2016-03-30
>
mj_langford02:03:32

Core Audio is a bit of a painful API last when I looked at it

mj_langford02:03:59

I’d even consider useing objective C for easier tying in with the C api. I haven’t dived into it since iOS9 came out though so it may be better

mj_langford02:03:31

I think Obj-C native module + cljsrn may be enough

mj_langford02:03:48

swift is fun, but cocoatouch is painful in places.

petterik04:03:18

Yeah, I get that too @vikeri. Seems like it's fine to ignore for now: https://github.com/facebook/react-native/issues/4547

petterik04:03:57

I ignore it by calling (set! (.-ignoredYellowBox js/console) #js ["Warning: Failed propType"]) in my init

johannesgu08:03:42

Stupid question: How do I call the camera roll from cljs? I have tried this: (.getPhotos js/React.CameraRoll #js {:first 2 :groupTypes "Album" :assetType "Photos"})

johannesgu09:03:14

But I get "Cannot read property 'getPhotos' of undefined"

johannesgu09:03:11

Aha, I had to link in the native library for CameraRoll...

misha11:03:07

good day, gentlemen. can someone describe in a few sentences, what it took to port om-next/reagent/etc. to react-native?

misha11:03:01

the goal is to decide between: a) porting another react wrapper to native, and b) porting application to one of the react-native wrappers

dvcrn11:03:03

@misha: you have to get rid of react Dom dependencies. That's more or less it

dvcrn11:03:12

Seriously. After that it's just swapping the library and rendering the root differently. In om.next case it was just replacing the 2 render functions with react native ones

misha11:03:27

reading reagent's source to see how it is done there to find out how interaction with react differs from react-native one

misha11:03:17

@dvcrn: ok, i am thinking about porting rum to RN. first: I have no idea how it works. yet. second: it depends on sablono for "dom templating" part. I want to keep it that way, which probably means I might need to extend sablono with RN tags. third: ??? nth: profit

misha12:03:14

@dvcrn: fyi https://github.com/tonsky/rum/blob/gh-pages/src/rum/core.cljs#L145-L146 changing this:

(defn mount [component node]
  (js/ReactDOM.render component node))
to this:
(defn mount [component node]
  (js/React.render component node))
makes re-natals hello world app work : )

misha13:03:11

@vikeri, @dvcrn, no "sablono-intergation", but still

vikeri13:03:02

Yeah but the folks at RN sure have made an impressive job on the abstraction layer...

misha13:03:00

true, even they emphasize on code similarity, not an actual (dom?) reuse

dvcrn13:03:28

Last time I checked there was still a big difference between react and react native. React is a good chunk more abstract and react native is playing catch up

dvcrn13:03:36

Though that could have changed by now

dvcrn13:03:08

Stuff like the ReactDOM doing the rendering and react are only components. Not sure how that can translate into native but it will happen for sure. Then both libraries could use the same react

vikeri16:03:23

About navigation. Since NavigatorExperimental is such a great fit for re-frame compared to NavigatorIOS or Navigator I’ve been trying to get it to work. I’ve skipped its state management part (since that will be handled by re-frame) but I can’t get a CardStack to render my content. Trying to adapt the following example:

vikeri16:03:53

With this:

[card-stack {:render-scene #(reag/reactify-component my-component)}]

vikeri16:03:50

Any ideas what I’m doing wrong, anyone got NavigationExperimental working?

vikeri16:03:41

Did seantempesta look into this for example?

seantempesta16:03:26

@vikeri: Funny you should ask, I plan on working on that today. simple_smile

vikeri16:03:41

Haha ok great! My approach was to try to adapt the card-stack example since it seems to be the most developed one. How are you thinking?

seantempesta17:03:54

Well, to be honest, I still don’t understand the underlying concepts so I was going to read the source until I got a better idea. Then I was going to look at adapting the RN-NavigationExperimental-Redux-Example since Redux also has a centralized data store. https://github.com/jlyman/RN-NavigationExperimental-Redux-Example

seantempesta17:03:56

also, it seems like this discord channel is where a lot of NavigationExperimental discussion happens https://discordapp.com/channels/102860784329052160/154015578669973504

vikeri18:03:07

@seantempesta: Ok! Interesting that they have moved from slack to discord btw. Maybe something we also should consider? Or Rocket.Chatt or some equivalent OSS.

vikeri18:03:05

Another note is that they are running on react-native master branch, I wonder why.

seantempesta19:03:25

It looks like the api is still shifting for NavigationExperimental, so people are staying on top of the changes

seantempesta19:03:49

Also, apparently there were major performance bugs in Android with it until 0.23.rc1

vikeri20:03:00

Okok. Do you know how much the react version affects re-frame, reagent and re-natal? I just upgraded my re-natal to the latest but I'm not sure about reagent, alpha sounds a bit intimidating.