fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Gerome 2021-05-01T12:46:53.288Z

Hi, I'm new to fulcro and I have trouble understanding how mutations work. Is there some real-world or working example of a fulcro app with inputs and all that I could look at?

Gerome 2021-05-02T12:18:29.298300Z

@holyjak What I struggle with in particular is how to put, say, an entire list of persons into the DB in your tutorial setup. It seems like merge-component is the solution here, but I can't do that in a mutation since it would create circular dependencies (the function requires the app and the component, the latter requires the mutation and now I'm in trouble, it seems). In my specific case, I upload a CSV into the browser. I turn it into a list of maps and now I want to somehow put it into my database. I could use swap! however, that also means that I have to manually do all the stuff that, I thought, fulcro takes care of, or am I completely on the wrong path?

Gerome 2021-05-02T12:39:58.298500Z

Reading your tutorial, it seems load! might be the right tool...

Jakub Holý 2021-05-02T12:48:32.298700Z

Load is the tool if the data is provided by a remote api. For the circular dependency there is a solution too, in the components namespace there are maps, functions to go from :my.ns/MyComponent to the component class. See https://book.fulcrologic.com/#CircularRefs

Gerome 2021-05-02T12:53:54.298900Z

Ooooh, the action has the component and application on the :env map!

Jakub Holý 2021-05-02T13:12:43.299200Z

@hk9861 https://chrisodonnell.dev/posts/giftlist/deployment/?

Jakub Holý 2021-05-02T13:24:03.299400Z

Also in a mutation don't use merge-component! but merge-component

👍 1
2021-05-01T13:08:49.289700Z

Also new to Fulcro. Started spending some time on the docs a couple of weeks ago. Besides the official docs, Tony’s grokking fulcro series has been extremely helpful for me: https://youtube.com/playlist?list=PLVi9lDx-4C_TBRiHfjnjXaK2J3BIUDPnf

👍 1
2021-05-01T14:09:14.290Z

I have a template that gives you a working app here: https://github.com/dvingo/dv.fulcro-template it uses clj -X:new to generate a new project for you. If for no other reason, you can use it to see a working example - it has a sample data model + ui that persists to a crux db. If you do try it I'd love to hear any feedback you have (good or bad!).

Gerome 2021-05-01T16:50:50.296400Z

Thanks for these suggestions, I’ll try them out!

Björn Ebbinghaus 2021-05-01T17:38:57.296700Z

@kamilwaheed0 @gerome.bochmann Actually there is a Tutorial Playlist für Fulcro 3. https://www.youtube.com/playlist?list=PLVi9lDx-4C_T7jkihlQflyqGqU4xVtsfi The "Grokking Fulcro" Series is more about the internal workings of Fulcro The 3rd video is about mutations: https://www.youtube.com/watch?v=KJsFLmkdRig You can find the files from the videos here: https://github.com/fulcrologic/video-series

👍 1
Jakub Holý 2021-05-01T18:37:35.297400Z

Anything in particular you struggle with? I'm always looking for things to improve in https://fulcro-community.github.io/guides/tutorial-minimalist-fulcro/...