I am using immutability-helper
(https://github.com/kolodny/immutability-helper) to update state in Redux actions. I have an array and I'm adding an element like this:
update(state, { modalAlerts: { $push : [payload] } })
It works great. However, I don't know how to remove the last element of the array using Immutability Helper without knowing the size of the array. What is the equivalent of something like update(state, { $pop: modalAlerts } })
(it doesn't exist) to remove the last element?