-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifted actions should have IDs #134
Comments
Makes totally sense to me! Just one question: If I understand correctly collapsedByActionId would be stored on the Monitor (state) right? |
👍 Makes sense to me, nice to enable these use cases without increasing the complexity of the devtools API. |
Each monitor would be responsible for maintaining the state it's interested in. With #132, monitors can export reducers which will receive all the same actions |
Nice! |
Fixed in vNext branch. |
Currently, lifted
PERFORM_ACTION
actions don't have any IDs. This causes the lifted state to be awkwardly denormalized:skippedActions
stores indexes fromstagedActions
and has to be adjust wheneverstagedActions
is reordered,timestamps
suffers from the same problem. Moreover it's hard to annotate actions like requested in #60 because indexes just aren't stable.If all lifted actions with
PERFORM_ACTION
type included an ID generated inperformAction()
lifted action creator, #60 would be solvable by the monitor storing something likecollapsedByActionId: { 42: true, 100: false, etc }
.I propose the following breaking change to the lifted state shape as part of #132:
Before
After
I don't think there's any point to normalizing
state
s because that's just derived data from DevTools point of view. But for actions, it feels important to enable use cases like #60 and make code insidedevTools()
simpler.@ellbee @ioss @calesce What do you think? Am I making sense?
The text was updated successfully, but these errors were encountered: