This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (13)
- # announcements (2)
- # asami (59)
- # babashka (6)
- # beginners (273)
- # calva (18)
- # cider (3)
- # cljs-dev (3)
- # clojure (84)
- # clojure-estonia (1)
- # clojure-europe (2)
- # clojure-france (11)
- # clojure-nl (3)
- # clojure-taiwan (2)
- # clojure-uk (23)
- # clojurescript (7)
- # code-reviews (321)
- # conjure (4)
- # data-science (1)
- # depstar (6)
- # fulcro (37)
- # helix (20)
- # juxt (3)
- # keechma (3)
- # leiningen (3)
- # malli (7)
- # nrepl (1)
- # off-topic (20)
- # pathom (25)
- # re-frame (30)
- # reveal (5)
- # shadow-cljs (25)
- # sql (15)
- # tools-deps (4)
- # uncomplicate (2)
- # xtdb (3)
Has anyone tried the new guardrails async mode? If so, did you notice a runtime dev speed improvement?
I would very much appreciate if you could provide your feedback on https://github.com/holyjak/blog.jakubholy.net/blob/master/content/asc/posts/2021/fulcro-divergent-ui-data.asc, which talks about: > Fulcro’s stateful components serve normally both as elements of the UI and to define the data model, i.e. data entities with their unique IDs and attributes. And that is what you want 95% of the time. But what if your UI and data model needs diverge? > We will take a look at what different kinds of divergence between the UI and data entities you might encounter and how to solve them. I am primarily interested in: 1. Is everything correct? 2. Have i forgotten some cases? 3. Any [better] examples / code samples to add? 4. Is it understandable to people "new" to Fulcro? 🙏
This is wonderful!
One thought: I think I would have groked it slightly quicker if the query / idents for
were shown in “A Data-only component” and similarly
PersonIdentification in the last section — you implied that
PersonIdentification queries for
person/name person/email in the explanation after, but would be nice to see that in the queries of the components
But also want to emphasize that I think its is a great blog post 🙂
I’m adding comments via https://web.hypothes.is/ @holyjak
I have never heard about ☝️. I suppose you will share a link to your comments eventually, or how does it work?
> Have i forgotten some cases? Let's say you have two data-only components that only differ in their query namespaces, e.g. pdf/name and pdf/size versus png/name and png/size, and you want to render these the same, e.g. (div (h2 name) (h4 size)). Comments about the naming convention aside, would this fit?
@U0P7ZBZCK Thanks! Perhaps. Could you elaborate more the problem you have encountered? Why data-only components in this case? And are you looking at how to avoid having to manually defsc for each of the file types or what? Thanks!
I was thinking of abstracting away the body of the defsc, i.e. have each defsc call a shared function that returns (div (h2 name) (h4 size)). Would this be the right approach, or is there an alternative I haven't thought of?
The text has been updated based on the feedback from @tony.kay and @U016TR1B18E https://github.com/holyjak/blog.jakubholy.net/commit/c94ec4653781ed48a6f9d631017d22c366b39b43#diff-050998bf7a90dabc83039fdbf53f25d425f3c15ae6b3bff0bcbb2911db1c9059 thanks a lot!
@U0P7ZBZCK Yes of course. It’s all just function calls anyway. If there’s a common layout/formatting concern there is no problem at all putting that in a function, or even a component without query if you want shouldComponentUpdate optimizations.
Tony: I have stolen your m/returning auth/Session example 🙂 https://github.com/holyjak/blog.jakubholy.net/commit/e6991515c57f2d44f2ae5aff90c4a4cbd6e3b039
Towards the beginning when you talk about defining the data entity, could you expand on static ident and dynamic ident, what they are, what they do, and possibly when it's appropriate to use them?
That's the only thing I was confused about in the entire article, thanks for the excellent content.
Hi, thanks! What I call a dynamic ident is one based on the props so (fn  [:person/id (:person/id props)]) or, in the template form, simply :person/id
@UAB2NMK25 is this https://github.com/holyjak/blog.jakubholy.net/commit/510250bf6bc2a03bcdfefef8f2afdda977eb3d70 better?
Really great article, @holyjak — Last night, I finally watched the 5+ remaining hours of @tony.kay Fulcro 3 videos at 1.25x speed, with the hopes of the big picture sinking in via osmosis. :). I went to sleep exhausted, but hopeful that clarity will eventually emerge later this week. 😁. (Eager to sit down in front of IDE and see if I can actually build something using what I've learned!) @holyjak — I love the work you're doing helping describe the critical Fulcro concepts!
Achievement Unlocked! I made a simple todo app for desktop and terminal using fulcro. It's not going to win any awards, but I think it's a good start. The code is available https://github.com/phronmophobic/membrane-fulcro. Thanks for everyone's help, especially @tony.kay! It's still a little rough around the edges, but if anyone is interested in trying, feel free to ping me and I'm happy to answer any questions.
I would like to add it to Awesome Fulcro if you are OK with it, see https://github.com/holyjak/awesome-fulcro/pull/4/files
you may have to update the tag line: > the most awesome webapp framework the Earth has ever seen. fulcro can do more than make web apps 😉!
I absolutely love the terminal version. I cut my coding teeth in C w/Curses in HP-UX and Solaris in the late 80's/early 90's. Played a ton of nethack in the wee hours, and while it seems a bit silly to use a terminal for UI these days, I still love it.
At some point, I'd like to implement something like this, https://github.com/sindresorhus/terminal-image, for membrane even though it's completely impractical. Also, I only learned recently that terminal actually supports mouse input.
long gone are the days of the single-color cyan terminal running at 19200 baud (via local wires)
complete digression, at one point I wrote an ncurses implementation of mine sweeper. The recursive clearing algorithm that opens up the board when you click where there are no mines is kind of fun to write, and if you set your terminal to 1200 baud with
stty you could watch it move the cursor around and change the text. Modern terminals ignore the device setting, so not as much fun.