This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-26
Channels
- # adventofcode (12)
- # beginners (141)
- # cider (3)
- # cljsrn (3)
- # clojure (76)
- # clojure-russia (1)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (15)
- # css (1)
- # duct (3)
- # emacs (5)
- # fulcro (85)
- # keechma (1)
- # leiningen (44)
- # off-topic (29)
- # om (6)
- # parinfer (4)
- # perun (1)
- # re-frame (18)
- # reagent (2)
- # ring-swagger (8)
- # shadow-cljs (5)
- # spacemacs (1)
- # sql (7)
@tony.kay Can the defsc df/load the remote db in the :initial-state
? I just want to fetch data as late as possible.
@tpliliang what you mean by load remote in initial state? usually we do the load on the :started-callback
I want to be able to play with multiple client types (react native on various platforms, android and ios native, and unity)... is that going to be an issue with edn, and if so should I tweak my approach (a.k.a. following a REST style for the server, or graphql)?
@macrobartfast I assume on all of those, since you’re implying Fulcro, that you’ll be using Clojurescript/Fulcro?
yep, indeed
that's what I'm unsure on...
I started with luminus...
then wanted a more decoupled solution, so tried liberator...
oh, clojure, fo sho
great!
I should just build out something along the lines of your getting started dealio, then worry about adding a different kind of client when I get that in place.
thrilled to find you here, btw...
went to untangled slack... crickets...
then read the banner at the top.
Read this: http://fulcro.fulcrologic.com/guide.html#!/fulcro_devguide.I_Building_A_Server
ah ok, well, I like fulcro more as a name 😉
The rolling your own might be helpful. Glad you like the new name. I do too…took me a while to get the muscle memory adjusted
I'll bet!
you need real-time string interpolation on your keyboard.
wow, ok...
been very shy about putting anything out there... so that'll be a good goal and catalyst for change.
I have not had time, and am open to patches as well if we need them. Should work with little or no work
I'm ridiculous to even be thinking about all those clients at this point, with my skill level.
I'll be lucky to get this all working.
exactly.
one other question, if you have time...
I started wanting to make a slick react dashboard, using components and widgets from various sources online... where do things stand on being able to pull in an existing React component into cljs?
I ask because last week I decided I might be better off just coding my front-ends in straight js/react...
but then I became sad at the thought.
it's a dumb non-question, actually... disregard... I'll get through your getting started material and think about that again.
@macrobartfast not a dumb question at all
the real problem was that I wanted to copy pasta react widgets for fun and profit.
and with clojurescript I'd have to, you know, think or something.
using libraries of them is quite a good thing. I’ve had various levels of success. I’ve heard people saying that shadow-cljs does a better job with libraries than just using cljs with cljsbuild.
ah, ok.
The latest cljs compiler does better and even has node support where it will try to pull them in. But the JS landscape is soo FUBAR, that it is a hard task
actually, another programmer at a coffee shop tried cljs, then used elm (which I'm not getting into), and the elm story was beautiful in terms of his being able to slipstream elm right into the webpack pipeline.
but I'm not going the elm route, but it was an interesting case study in a js dev trying to work a better language into his workflow.
but there does seem to be a need to go all in on cljs... very hard to incrementally adopt it.
but I'm babbling... too many christmas treats... I'll start on the getting started material.
cool. The new Developer’s Guide at http://book.fulcrologic.com is incomplete, but the Getting Started chapter has been integrated there.
oh sweet!
you are a machine.
this is the most tedious the docs have been for me. Editing is not my strong suit. I can spew new docs a mile a minute…but editing…oh god 😞
well, I'll put my editing hat on when I follow along.
@tony.kay hello, I was starting to use hte new load :initialize
, but I found a blocker, it can't initialise to-many relationships
because it works by merging, and when we call the initial-state we don't know about the children, so I can't find a way to initialize those properly
do you have any idea on how to initialise those?
issue your load using load-action
and initialize them before the load within your own mutation?
I’m not even sure how you’re going to solve it manually…you don’t have the IDs in order to initialize them.
my previous solution still works, but it's a different approach, it uses the query to navigate the result and initialise things
but it has it's own problems too, there are some situations that it can't follow (can be fixed, but the algorithm is getting complex)
we did that because the step in processing where you want to work is somewhat disconnected from the inputs of load I believe
but that's tricky, you can't even know how many elements are coming, and the reverse merge would just ignore whatever you put there
So, we normally do have the query. We just don’t have the options to tell us that initialize is set
I’m working on docs. Open to suggestions, but I want to keep going on what I’m working on at the moment.
well, if you are initializing we can just start doing recursively, kind of, need some experimenting
I can look on that
and the book is looking good, just flipped on it now 🙂