This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-12
Channels
- # announcements (2)
- # babashka (22)
- # babashka-sci-dev (15)
- # beginners (62)
- # calva (2)
- # cider (8)
- # clj-kondo (33)
- # clojure (52)
- # clojure-europe (46)
- # clojure-losangeles (1)
- # clojure-norway (5)
- # clojure-spec (7)
- # clojurescript (31)
- # conjure (20)
- # data-science (4)
- # datalevin (16)
- # fulcro (28)
- # hyperfiddle (71)
- # introduce-yourself (3)
- # lsp (50)
- # off-topic (16)
- # polylith (8)
- # portal (3)
- # practicalli (1)
- # reitit (1)
- # releases (2)
- # tools-build (22)
- # vim (8)
- # xtdb (17)
Hello, all — since 2021, I think I’ve had 12 recorded Zoom calls with @tony.kay, getting his help learning Fulcro and Fulcro RAD to build apps to solve a problem. I’ve been meaning to publish these as I go. Motivated by how much I’ve learned from Tony in the last couple of weeks, I’m starting to write notes for all of them. Watching these again, I’m learning so much. I’ve cleaned up 3 of these recordings, so that they have detailed notes like as follows: (Only the first three are done, but the other recordings are available, but don’t have these notes.) I think these would be valuable for any novice, and likely even people with years of experience. Video 1 starts out with “how come my simple button app doesn’t work?” and “what is an ident?” and it wanders into “why are there so many ways to set initial state?” (quick answer: legacy inherited from Om Next, and in general, use a simple map, so you get compile time checking) The app he helped me with is what became the RSS archive reader toy app: https://github.com/realgenekim/rss-reader-fulcro-demo Following videos track how I built a Trello card management tool that I still use today. It’s pretty wild seeing Tony help me create the controls that I still use and change today. I’ve written 5+ apps just this year, which Fulcro and Fulcro RAD made possible (e.g., store Amazon receipts to make expense reporting easier, search an archive of Twitter I have in MySQL, view/modify data from OpenAI API, report on Sessionize CFP data, view Zoom recordings). I’d like to create a “cookbook repo” with a bunch of these little tricks and functions I use all the time: (or maybe I’ll add it to the work that @holyjak has already done.) • building a report • building a form • taking over rendering of component • custom formatters • rendering a video URL • wrapping a React treeview control • building a “multi-row” table using BodyItem • the simplest roundtrip mutation At any rate, watching these videos again, I realize how much Tony taught me about app architecture and design, how to use Cursive/IntelliJ, and so much more. Here’s the YouTube playlist — enjoy, and if you learn anything, please post here! https://www.youtube.com/playlist?list=PL4aJznIeHN6xSZTcbibLEOSF5kQt9dt1S
I want to acknowledge @holyjak’s help, too — I recorded the sessions we’ve done, as well. I’ll get to those after I process the Tony Kay sessions.
Awesome, thanks a lot for sharing, and for putting all the effort into making these available and even more useful for people!
Whoa! This is incredible. Thanks for sharing.
I agree. I've just finished the first video and it is so helpful - great to see the interactions and explanations and undo some of the assumptions about how things work from the ground-up. Thank you both.
amazing. thank you for this!
Hi, just scoping out - since Fulcro uses React for rendering, what kind of work would be required if e.g. I were to use Headless UI or Radix components ?
See https://github.com/fulcrologic/fulcro-rad-semantic-ui for a complete component library using Semantic UI Doesn't need to be as complete just implement the components you need
thank you
what if I don't want to use RAD and use Fulcro base libraries instead ?
this looks like it's heavily baked in with RAD form component
i think i'll have to try it out 😄
is there an example anywhere of using react component library and adding it to fulcro ? cause from the docs, i assume you have to use defsc and that manages state etc
sorry if my questions don't make sense
i'm not sure how the component will be called from within fulcro defsc
OK, so here are the general tips: you want the raw namespaces (raw.components and raw.application). The standard components and application are tied to React, as are a few other nses. Fulcro is “react first”, but not “react only”. The trick with doing alternate rendering is that you’ll have to install your own rendering function, which will just be called whenever a transaction changes state somehow (see the fulcro app constructor arguments). Then you’ll need to generate “components” that are compatible with the component options mechanishm (e.g. see http://raw.components.nc). The transaction/networking/data system relies on component options to find query fragments, idents, and initial state for initializing the state database.
thanks @tony.kay - i guess then this is not a trivial change. I was hoping that since Radix is built on React, that using Radix components would be straight forward
FUlcro is not about rendering. React is. Fulcro happens to use it, but unmodified. Fulcro is about data management. It does happen to integrate the two where necessary/convenient, but vanilla js components are usable. See book for examples/.
when you asked what kind of work and said “headless UI” and another thing I’ve never heard of I just assumed you were trying to use something other than react
Both are just plain old React component libraries, think there was just some confusion on React js => cljs from OP
If you use a js React component to “hold” fulcro components then there is a little interop to do, but that is explained in the book
sorry if I confused you guys with my questions. Yes, headless ui and radix are react component libraries which are unstyled components, Radix has good support for accessibility features which is why it's quite popular. Like @U043RSZ25HQ mentioned, i was interested in knowing how easy or difficult it would be to use Radix react components in a fulcro project.