Identified State #3754
arnauddorgans
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Across many projects I built with TCA in recent years, I have experienced the same need that is lacking for a solution in the current TCA library
Let's say that you have an app with real-time features, and in an optional child feature, you have to subscribe to live events for a specified id.
Today, what we can do to properly have a child feature identified by a key and have all its running effects be cancelled properly when the child state ID changes, is to use an
IdentifiedArray
even if the array will ever contain one or zero items.What I would like to have is either an
IdentifiedState
(propertyWrapper) or to have something that do it automaticaly if the child feature state isIdentifiable
.This is the unit tests I expect to pass
And here is what I did in my project to make the tests pass
Beta Was this translation helpful? Give feedback.
All reactions