Fork me on GitHub

I'm trying to do a remote mutation (deleting a note) and I'm having an issue when I get down to Here's my trace... the issue is that it inserts this 2 nil into the state for some reason whereas I'm trying to delete :note/id 2. Update: I guess it's because of this part from the update-in docstring: > If any levels do not exist, hash-maps will be created. So in my case, [:note/id 2] does not exist, and it gets created as 2 nil, but why? I am deleting this exact object in the client mutation using:

(normalized-state/remove-entity state-map                      
                                [:note/id note-id]                      
                                #{:note/card-list :card-list/cards}) 
=> {:com.fulcrologic.fulcro.application/active-remotes #{}, :fulcro.inspect.core/app-id "buidler.ui/Root", :fulcro.inspect.core/app-uuid #uuid "fde8c483-7e26-4bfd-87fe-fdce9e8d9654", :note-form {:singleton #:note{:text ""}}, :note-list {:singleton #:note-list{:notes [[:note/id 1]]}}, :note/id {1 #:note{:delete-visible? false, :id 1, :text "foo from server"}}, :root/note-form [:note-form :singleton], :root/note-list [:note-list :singleton]}


it's hard for me to speculate just from what you've said--if you could share some code (e.g. for the mutations) that'd be helpful


@U49U72C4V it's a followup to this thread here Note that the issue does not seem to be in rewrite-tempids!, but in update-errors-on-ui-component!.


ah i see thanks, boy that's a hairy thread


need go afk for the moment but if i were to debug this i think i'd try to find a way to look at what happens once the mutation response is received in the client, as early as possible


oh, and another idea in case you haven't tried it yet: the DB tab of fulcro inspect has a bar in the top left you can use to step through app state after every tx... might catch something interesting there


Thanks, will try those options.


Nothing really sticks out in the tx list:

(buidler.mutations/delete-note {:note/id 2})
(com.fulcrologic.fulcro.mutations/set-props {:note/delete-visible? true})
[{[:note-list :singleton]


Does the nil cause any runtime problem? I’m not terribly interested in a “bug not bug” that leaves harmless nils laying around.


I thought it was causing a runtime problem on refresh, but the error is of course mine. I was neglecting to update the note-list-table which had the note ids, while at the same time deleting particular notes, so the ids in the table could no longer be found on the next refresh. Oh well, I learned lots about debugging through my stupid mistake :)

👍 3

typed dom/marquee, no match. sad 😢


i know i know, it's obsolete, user-hostile, etc.