This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-01
Channels
- # adventofcode (93)
- # announcements (44)
- # asami (23)
- # aws (1)
- # babashka (48)
- # beginners (112)
- # calva (26)
- # cider (57)
- # clj-kondo (17)
- # cljfx (5)
- # cljs-dev (21)
- # clojure (124)
- # clojure-europe (19)
- # clojure-hungary (40)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (3)
- # clojurescript (3)
- # cursive (81)
- # datalog (11)
- # events (21)
- # exercism (1)
- # fulcro (37)
- # graalvm (1)
- # introduce-yourself (8)
- # jobs (1)
- # lsp (1)
- # malli (5)
- # membrane-term (17)
- # minecraft (3)
- # nextjournal (5)
- # off-topic (14)
- # other-lisps (14)
- # polylith (58)
- # reagent (16)
- # reclojure (3)
- # reitit (6)
- # remote-jobs (1)
- # shadow-cljs (55)
- # spacemacs (15)
- # testing (2)
- # tools-build (7)
- # tools-deps (191)
Today's re:Clojure workshop: @holyjak about writing web apps with Fulcro. https://www.eventbrite.se/e/reclojure-workshop-introduction-to-creating-webapps-with-fulcro-tickets-188718210247
Any advice on how to dynamically set window title when using the dynamic router? Ideally, I would derive it from the props of the component which is a router target.
You could parse the query-params in :will-enter
and then just set!
the window.document.title
.
But I think the proper way to do it, would be to hook into the routing system somehow, so you have proper support for going back and forth
:will-enter
was my first thought as well. Thanks! Let's see if anybody has something 'smarter' 🙂
You have also React callbacks so you could use :componentWillMount where you have the props and set! it there. Not sure what is optimal here
I just remembered that the https://github.com/fulcrologic/fulcro/blob/develop/src/main/com/fulcrologic/fulcro/routing/dynamic_routing.cljc#L347. In my opinion the :ready!
event or a custom ready-handler
would be a good way to go. Unfortunately it seems that it's not straightforward to customize the machine without also customizing change-route-relative!
and initialize!
. At least that's how I see it right now. Maybe someone has an idea how to do this(?)
I haven't gotten around to learning state machines yet – I will look it up. Thanks for you effort, @U012ADU90SW!
FYI: @holyjak is giving a 2 hour workshop on Fulcro as part of re:Clojure right now — registration details here: https://www.eventbrite.com/x/reclojure-workshop-introduction-to-creating-webapps-with-fulcro-tickets-188718210247
Hey, I'm trying to join the workshop, but on the event page I can see literally anything. Can someone help me?
Sorry, the workshop was full and I failed to provide better info on the page. But you will be notified when I plan the next one and have a say in when 🙂
Hey, I'm trying to join the workshop, but on the event page I can see literally anything. Can someone help me?
I had the same issue and no fix has presented itself, I guess I'll catch the next one.
if you reload the event page you should have some info now
@holyjak on the coding exercices, I was stuck on the task 5.2 because the solution was in 5.3 and I did not read ahead.
Excellent, thank you! I will make it clearer. Did you run the hints? Perhaps adding a third hint that states that would work well?
(BTW Amazing you have got so far and so quickly. Have you studied Fulcro previously?)
I saw ; NOTE: This is on purpose incomplete
but didn't know that it was related to the problem.
I don't think I was fast compared to the other participants.
I did read about Fulcro a while ago (maybe 2 years ago), so I remembered the main lines.
This part is problematic, as it can make people think that the data should be normalized after adding the idents.
2. Make sure the data is normalized in the DB by adding idents. What will the DB look like?
That's why I didn't look ahead.Ok, I will reword to > 2. Try to make the data normalized in the DB by adding idents. What will the DB look like? Will that help? And what about the 3rd hint, would you have found that?
I think that you should state that it won't work at the end of the same section.
For example
2. Attempt to normalize the data in the DB by adding idents. What should the DB look like? Something is missing to make the normalization work, see what in the next step.
@holyjak I just realized that I was doing the wrong exercises all along ! :rolling_on_the_floor_laughing:
the workshop was at https://github.com/holyjak/fulcro-intro-wshop/blob/main/docs/Workshop.adoc and I was reading (ns holyjak.fulcro-exercises)
instead
> Will that help? And what about the 3rd hint, would you have found that? Because I arrived on the source code directly, I didn't realize that the hints could be evaluated. I thought it was a kind of mark up language for external processing.
How do I prevent others from making the same mistake? Also, there is https://github.com/holyjak/fulcro-intro-wshop/blob/main/src/holyjak/fulcro_exercises.cljs#L13 :-)
The mistake on hint
was 100% mine, I skipped some text while reading.
To avoid losing people who do not pay attention, in schools the teacher keeps the most important information on the blackboard while doing the lessons. In Zoom, that would translate into a sticky note in the screen you are sharing.
How have you arrived at the exercises file? Because you heard "exercise" so you searched for a file with that name?
I was late to prepare the project, so while the workshop started I tried to get the todomvc running. I did it via Cursive/IntelliJ and ran into minor problems. Once I had it running, the other participants already started the exercises, so yes that's where I tried to find where it was in the project. After seeing that the exercises were not related to the todomvc app, I thought that maybe the todomvc was just for verifying the setup and won't be used. Then I tried to get back to the same exercises than the other participants, and that's how I skipped the few lines of explanations about the hints.
I don't regret anyway, I got the chance to use Fulcro and I enjoyed it.
Observations from Fulcro Workshop that @holyjak conducted: • amazing work from Jakub creating the exercises — I’m pretty certain this would have saved me 10+ hours of struggling had this been around when I learned Fulcro. • extremely high success rate of people getting dev environment going: of the 16 people or so who where there, only about three people had trouble getting their dev environment going — they were primarily npm versioning/path, Calva setup, one odd dependency error, one person had trouble getting Fulcro Inspect running. Kudos to @tony.kay for making this so bulletproof. (And what a long way ClojureScript has come since 2016! 🙂 • people seemed to be cranking through the exercises quickly (I was taking kids to school, so couldn’t follow along.) • in short, I think Jakub has created the best onboarding experience yet — highly recommended! • I believe he’ll be posting the 2 hour workshop video eventually — it was a 15-20m You can find the repo here: https://github.com/holyjak/fulcro-intro-wshop. Exercises are here: https://github.com/holyjak/fulcro-intro-wshop/blob/main/docs/Workshop.adoc
Thank you Gene! I will not be posting the recording but I will make a separate one soonish.