I'm having trouble manipulating state in an Om app. Specifically, I can't figure out how to remove items from a list.
Here's a demonstration of my folly. It's a simplified app that's broken. https://gist.github.com/rerb/29d10959e71ba1e31e8e
Two buttons are displayed. When pressed, they should remove themselves.
After deleting the first item, I get this error when trying to delete the second:
Uncaught Error: No protocol method IDeref.-deref defined for type cljs.core/PersistentArrayMap: {:id 2}
If I delete the second one first, I get this error when trying to delete the first:
Uncaught Error: Assert failed: Can't put nil in on a channel
What simple thing am I missing? I'm Einstellung.