Fork me on GitHub
#fulcro
<
2018-11-23
>
bbss07:11:17

Okay, thanks for the pointers!

Andreas Liljeqvist10:11:59

Can I access props from this in a mutation? Often it would be helpful to access the same :db/id without passing it by extra parameters

wilkerlucio10:11:17

there is :ref key on the environment map, this key tells you the ident of the component that triggered the mutation, using (get-in @state ref) you get all the data from that ident

Andreas Liljeqvist12:11:23

That is helpful, thanks!

Pontus19:11:14

I recently started storing ids of entities in the route, e.g. /#73, to enable bookmarks. But forgot about the tempid remapping feature, so when creating a new entity this now gets put in the url /#fulcro/tempid[%22af8616a5-caf1-4e90-b531-52551795fdb1%22], which understandably doesn't get updated when the server returns with the remappings of tempids to real ids. Is there a callback or something to a mutation that I can hook into and also update the tempid that gets stored in the route?

Pontus13:11:53

Solved it by storing the active entity in the db again so it could be updated with the tempid remapping. Then update that id by reading from the the route in componendDidMount / onhashchange