Delete Item With References #1757
-
I've looked at the documentation and looked on the internet for similar questions/examples but I may have missed them. Apologies if the answer to this is trival. I have a basic toy example I'm using to wrap my brain around MobX-State-Tree concepts.
If I have added a todo that has a reference to users, but then I execute
Is there a way to delete an object being referred to (in my case User) and having the item referring to it (in my case Todo) have its references set to 'null' perhaps? Or some prescribed way to delete items like this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use a types.safeReference to have MST do the bookkeeping for you. |
Beta Was this translation helpful? Give feedback.
You can use a types.safeReference to have MST do the bookkeeping for you.