Skip to content

[7.x] [State Management] State containers improvements (#54436)#54562

Merged
Dosant merged 1 commit intoelastic:7.xfrom
Dosant:backport/7.x/pr-54436
Jan 13, 2020
Merged

[7.x] [State Management] State containers improvements (#54436)#54562
Dosant merged 1 commit intoelastic:7.xfrom
Dosant:backport/7.x/pr-54436

Conversation

@Dosant
Copy link
Copy Markdown
Contributor

@Dosant Dosant commented Jan 13, 2020

Backports the following commits to 7.x:

Some maintenance and minor fixes to state containers based on experience while working with them in elastic#53582

Patch unit tests to use current "terminology" (e.g. "transition" vs "mutation")
Fix docs where "store" was used instead of "state container"
Allow to create state container without transition.
Fix freeze function to deeply freeze objects.
Restrict State to BaseState with extends object.
in set() function, make sure the flow goes through dispatch to make sure middleware see this update
Improve type inference for useTransition()
Improve type inference for createStateContainer().

Other issues noticed, but didn't fix in reasonable time:
Can't use addMiddleware without explicit type casting elastic#54438
Transitions and Selectors allow any state, not bind to container's state elastic#54439
@Dosant Dosant added the backport This PR is a backport of another PR label Jan 13, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Dosant Dosant merged commit 26b5cd8 into elastic:7.x Jan 13, 2020
@Dosant Dosant deleted the backport/7.x/pr-54436 branch January 13, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants