fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Jakub Holý 2021-05-01T08:26:34.283600Z

That is weird. And you say that doing what you did in pre merge prevents it? But pre merge only influences what data comes into the client DB and props come from there. So what is the diff in client DB in the two cases (with and without pre merge nillify)?

nivekuil 2021-05-01T08:37:31.283800Z

yes, nilify-not-found in pre-merge (what @dvingo posted in the later log I linked above) will result in the nil returns having values of nil in the client db/props, instead of ::not-found.

nivekuil 2021-05-01T08:38:24.284Z

not sure what you mean by "only" influences the client db data. is there a larger scope you're thinking of?

2021-05-01T12:40:47.287Z

yes, I understood it's very much in flux still. it was just an fyi. I'm experimenting myself now with a small macro to step through a "spec" with events on the various state machines in my app. It's really nice!

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

2021-05-01T14:17:05.290300Z

It's been a while, but I think I was passing the data in pre-merge to an entity construction function that had guardrails annotations and the ::not-found values were causing the instrument check to throw. I used this helper to remove them: https://github.com/dvingo/my-clj-utils/blob/master/src/main/dv/fulcro_util_common.cljc#L169 I suppose you could try incorporating this helper in the :global-eql-transform of the fulcro app to get this as default behavior.

tony.kay 2021-05-01T15:15:00.290600Z

fun

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:34:23.297200Z

I mean that load and pre-merge have in a way nothing to do with the props your component sees. They only affect what data ends up in the client DB. Then, when you render, Fulcro reads from the client DB to construct the props for the component. So if you are saying there is a difference then there must be a difference in the data and the client DB. What is it?

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