Fork me on GitHub
#fulcro
<
2021-12-01
>
zeitstein12:12:20

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.

xceno13:12:08

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

❤️ 1
zeitstein13:12:20

:will-enter was my first thought as well. Thanks! Let's see if anybody has something 'smarter' 🙂

Jakub Holý (HolyJak)17:12:30

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

👍 1
xceno22:12:14

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(?)

zeitstein10:12:26

I haven't gotten around to learning state machines yet – I will look it up. Thanks for you effort, @U012ADU90SW!

genekim15:12:40

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

Eduard Kvashyn15:12:01

Hey, I'm trying to join the workshop, but on the event page I can see literally anything. Can someone help me?

Jakub Holý (HolyJak)17:12:22

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 🙂

Eduard Kvashyn15:12:23

Hey, I'm trying to join the workshop, but on the event page I can see literally anything. Can someone help me?

Michael W15:12:55

I had the same issue and no fix has presented itself, I guess I'll catch the next one.

Jakub Holý (HolyJak)17:12:05

if you reload the event page you should have some info now

Vincent Cantin17:12:35

@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.

Jakub Holý (HolyJak)17:12:17

Excellent, thank you! I will make it clearer. Did you run the hints? Perhaps adding a third hint that states that would work well?

Jakub Holý (HolyJak)17:12:23

(BTW Amazing you have got so far and so quickly. Have you studied Fulcro previously?)

Vincent Cantin17:12:31

I saw ; NOTE: This is on purpose incomplete but didn't know that it was related to the problem.

Vincent Cantin17:12:05

I don't think I was fast compared to the other participants.

Vincent Cantin17:12:46

I did read about Fulcro a while ago (maybe 2 years ago), so I remembered the main lines.

Vincent Cantin17:12:39

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.

Jakub Holý (HolyJak)17:12:10

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?

Vincent Cantin17:12:51

I think that you should state that it won't work at the end of the same section.

Vincent Cantin17:12:37

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.

Vincent Cantin17:12:58

@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

Vincent Cantin17:12:55

> 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.

Vincent Cantin19:12:29

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.

👍 1
Jakub Holý (HolyJak)20:12:00

How have you arrived at the exercises file? Because you heard "exercise" so you searched for a file with that name?

Vincent Cantin22:12:33

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.

👍 1
Vincent Cantin22:12:13

I don't regret anyway, I got the chance to use Fulcro and I enjoyed it.

genekim18:12:03

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

👍 1
🔥 3
Jakub Holý (HolyJak)20:12:31

Thank you Gene! I will not be posting the recording but I will make a separate one soonish.

genekim00:12:23

Ah, crap. I screwed up the links — I’ll try to fix it tonight, but wanted to flag it for you here just in case. 😞 (I thought it looked fine in the Visual Studio Code editor!!!)

genekim00:12:33

Links fixed. 🙂

Michael W18:12:38

I got fulcro-rad working with xtdb based on the fulcro-rad-template repo and it's quite nice. Stellar job on fulcro and rad!

fulcro 5
xt 3