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/
@carocad sorry the delay, totally forgot yesterday, here is the source I was telling you: https://github.com/wilkerlucio/remember-mobile
it's been a while, but I remember back then I was able to run it
if you starting, I recommend Fulcro, it uses Om.next under the hood but makes the app development experience much easier, check at #fulcro
@wilkerlucio I am trying Om with a react native app. Is it possible to use fulcro for that? because it looks very html oriented
yes you can, Fulcro uses the same html (React) building blocks as Om, what makes you see it as html oriented?
well the getting started section had lots of watches for things like css and html templates
this? https://github.com/fulcrologic/fulcro/blob/develop/GettingStarted.adoc
yes exactly
it has the initial html setup and a basic css watch from figwheel, but that's all ๐
after step 1 there is no more html
@wilkerlucio 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
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
@wilkerlucio are you part of the development of fulcro?
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
@wilkerlucio 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
@wilkerlucio do you have by any chance an example react native app built with fulcro?
@carocad I might have at my home computer, right now at the office, but I can send you something later when I get home
@carocad this is the option you need to send to override the mount functions: https://github.com/fulcrologic/fulcro/blob/develop/src/main/fulcro/client/core.cljc#L98-L99
@wilkerlucio 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
humm, don't remember anything right now, but considering the CLJS compilation in general, had you tried using the cljsjs version?
@wilkerlucio 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 ๐
@carocad 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
@wilkerlucio 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
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
.