Fork me on GitHub
#om
<
2017-11-17
>
carocad09:11:41

hey guys, I am new to Om and I am trying to get a very simple routing working. I followed the tutorial in this website but I am struggling with extending the concept. The problem is that the inner elements to pass their queries up. But I dont know how to "forward" a query once I am in the read method 😞. Any help is much appreciated https://anmonteiro.com/2016/02/routing-in-om-next-a-catalog-of-approaches/

wilkerlucio10:11:33

if you starting, I recommend Fulcro, it uses Om.next under the hood but makes the app development experience much easier, check at #fulcro

carocad10:11:05

@U066U8JQJ I am trying Om with a react native app. Is it possible to use fulcro for that? because it looks very html oriented

wilkerlucio10:11:04

yes you can, Fulcro uses the same html (React) building blocks as Om, what makes you see it as html oriented?

carocad10:11:30

well the getting started section had lots of watches for things like css and html templates

carocad10:11:47

yes exactly

wilkerlucio10:11:14

it has the initial html setup and a basic css watch from figwheel, but that's all 🙂

wilkerlucio10:11:55

after step 1 there is no more html

carocad10:11:20

@U066U8JQJ thanks for the recommendation. But I think that at least for the moment I will stick with plain Om.Next. From what I see in this discussion native support is not one of the targets right now. Om.Next + react native is already a very small community; adding fulcro to that will most likely get me stuck whenever I hit a bug that nobody else is interested in solving https://clojurians-log.clojureverse.org/fulcro/2017-08-26.html

wilkerlucio10:11:30

I've been working with Om.next since it started, I can tell you that, if you can use Om.next, there is no reason you can't use fulcro, it's just a layer of stuff that you will end up writing anyway.... I've seen many people try this path of going strait Om.next and regret, because it's too bare bones, you can try, but I'll telling you will have a lot of work in front of you... I personally had made some toy projects with Fulcro and React Native and I see no problem in terms of setup (not more that you will have to get any cljs there anyway). Really, the only thing that changes from HTML to React Native is the functions to mount/unmount the application, in the same way you override that in Om.next you do on Fulcro. Of course, do you own research and decide, this is the best advice I can give you

carocad11:11:08

@U066U8JQJ are you part of the development of fulcro?

wilkerlucio11:11:24

@U0LJU20SJ not really, I do collaborate with the project, but it's mostly maintained by @U0CKQ19AQ.

wilkerlucio11:11:10

and after seen some many people getting frustrated with Om.next because the difficulty of entry... Fulcro solves most of those difficulties, by getting optioned and by having way more documentation (and videos). and from my personal experience, I never felt the need to go back to raw Om.next, I don't miss anything on the Fulcro side (by the contrary, I would miss a lot if I get back to raw om.next), and that's why I recommend it so strongly

carocad11:11:45

@U066U8JQJ I am currently watching the videos and I agree that they explain much much better the concepts of Om.Next. I was struggling with those things even by reading several blogs about it. I will keep checking the videos and see if I can get fulcro going with react native. There are tons of little quirks applied on top which is why I am a bit skeptic that it will work but I guess I need to experiment with it

carocad12:11:35

@U066U8JQJ do you have by any chance an example react native app built with fulcro?

wilkerlucio12:11:13

@U0LJU20SJ I might have at my home computer, right now at the office, but I can send you something later when I get home

carocad14:11:56

@U066U8JQJ I am trying out fulcro and it seems to start well but then it crashes. It says "cannot find variable React". I know that this is not exactly a fulcro problem but I thought that you might have already encountered it. The problem is that I already have a (set! js/React (js/require "react")) in the code

wilkerlucio14:11:30

humm, don't remember anything right now, but considering the CLJS compilation in general, had you tried using the cljsjs version?

carocad16:11:09

@U066U8JQJ fulcro does looks very promising now that I have started to create queries and the normalization thing is starting to pop up 😄. However I havent been able to get arount that React bug 😞

wilkerlucio16:11:24

@U0LJU20SJ yeah. running any CLJS there is an annoying bootstrap, I should get a little late home today, but once I get there I'll try to find the experiment that I did to send to you

carocad16:11:41

@U066U8JQJ I will see if I can get it working but if you get curious, here is the project that I am working on: https://github.com/hiposfer/hive/blob/om/src/hive/core.cljs It uses Expo instead of raw react native

wilkerlucio21:11:10

@U0LJU20SJ sorry the delay, totally forgot yesterday, here is the source I was telling you: https://github.com/wilkerlucio/remember-mobile

wilkerlucio21:11:20

it's been a while, but I remember back then I was able to run it

dyba17:11:22

Hi everyone, I’m migrating from Om to Om Next. I have some data that I’ve fetched from the server, but it’s not in the format that I want to store it in the global atom. How would I go about modifying the response and storing it in the correct location in the atom? I’ve been considering adding a :merge option to my reconciler configuration. At this point, I’m reading the source code to figure out how this works and I’m at a loss for what to put in :tempids.