fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Alex Piers 2021-01-02T03:29:19.021800Z

Happy and Healthy New Year! @tony.kay Absolutely, it'd be my pleasure to be your video editor. I shall edit out the audio glitches in the videos while @alex-eberts looks into creating notes for the videos.

Mr. Savy 2021-01-02T03:47:45.024400Z

For my infinite scroll, I want to take one item out of my storage vector (or just read the next item) and add it to the vector of ui items I currently have displayed. would that be best accomplished by a merge! or transact!? I'm thinking I could have an id associated with each item, and then I would call a transact! where I would pass in the id (or (inc id)) to load the next one. Perhaps there's a simpler way though? Maybe load!? I see there's an targeting/append-to option which seems like it might fit my use case. There's also df/load!... It seems like there's a lot of different options, but from what I'm reading append-to is probably the option I'm looking for.

Björn Ebbinghaus 2021-01-02T11:39:35.026100Z

You definitely want to load! somewhere. I think you don’t want to load an infinite number of things. load! with :append-to sounds reasonable. BUT You want to keep the thing that are actually rendered small. Either: Paginate (which I don’t think you want for infinite scroll 🙂) Or have a look at virtualized lists in react.

🙏 1
Jakub Holý 2021-01-02T13:46:42.026500Z

Transact is the most generic operation. Load leverages it. Merge only inserts data you already have. So indeed load! with the right target is best as Bjørn says

Jakub Holý 2021-01-02T16:11:42.027Z

I see Tony has previously proposed something like

(load! this :user/posts PostComponent {:target (t/append-to [:user/table id :user/posts] :params  {:pathom/context {:user/username "bob" :page n} } ) 
why does this not work for you? Not sure what you mean by > out of my storage vector (or just read the next item) and add it to the vector of ui items What is a storage vector? Do you mean a vector you have on the backend? That would imply that you indeed need load! since you want to load data from the backend.

👍 1
Mr. Savy 2021-01-02T18:23:10.031500Z

yeah I'm using vectors to store backend data so it's just a vector of component data. thank you both! I will look into these suggestions

2021-01-02T03:52:13.024600Z

Hi @alexpiers.fp 🙂 I was able to fix two instances of coughs on 1) “Fulcro RAD Structural Overview” at 25:50 and 2) “Building Things with RAD” at 59:00 directly in YouTube Studio (Tony gave me limited edit access to his channel). Happy to let you take over if / when we find other glitches.

2021-01-02T03:52:48.024800Z

Could you do me a favour and check that the fixes went live on YouTube? Thanks! https://youtu.be/H2XY5kdcjGU (RAD Structural Overview).

2021-01-02T03:53:55.025100Z

Building Things with Fulcro RAD : https://youtu.be/P2up8qcDmJs

Mr. Savy 2021-01-02T03:59:26.025300Z

man load has a lot of options lol

Alex Piers 2021-01-02T05:12:51.025500Z

@alex-eberts Yes, just checked, both videos are live on YouTube and the edits are very well done. Thanks for the quick fix!

2021-01-02T17:54:00.030600Z

Hi Everyone - If you come across any audio glitches (coughs, loud pops, etc.) in Tony’s Fulcro videos on YouTube, please post the name of the video, the video link and the timestamp where the glitch occurs to the slack channel and I’ll fix it. Thanks!

👏 1
❤️ 4
Mr. Savy 2021-01-02T23:52:25.033300Z

when I trigger a load!, does it also need a corresponding defresolver like transact! does?