Skip to content
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

Unify useDom, useDomLoader and useAppState #2677

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Sep 14, 2023

Unify the three reducers into a single one AppState. Having separate useDom, useDomLoader and useAppState, each with a different subset of the same state feels a bit complicated. We can leave the selection to consumers of the state instead. I'm also trying to add more than just the dom in this app state and the nomenclature gets all messed up.

@Janpot Janpot added the core Infrastructure work going on behind the scenes label Sep 14, 2023
@Janpot Janpot marked this pull request as ready for review September 15, 2023 08:25
@Janpot Janpot requested a review from a team September 15, 2023 08:26
Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

When the app state became more complex I ended up splitting these by different hooks, as I wasn't sure if we should have undo/redo logic eventually be separated from the DOM loading logic, for example. But it was all open to feedback / iteration.
This is less confusing and they were still not completely decoupled so if you feel like it's fine we can have it all together!

@Janpot Janpot merged commit 7dd6587 into mui:master Sep 15, 2023
1 of 2 checks passed
@Janpot Janpot deleted the simplify-appstate branch September 15, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants