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

Replace connect with hooks in 3 components #7552

Merged
merged 2 commits into from Aug 24, 2022

Conversation

Andarist
Copy link
Member

I was playing with reduxjs/react-redux#1940 and I've started looking into the codebase here. Since I've never actually used "modern Redux" in an app I've figured out that it would be a nice exercise to migrate a few components to hooks.

Feel free to do whatever u want with this PR 😉 cc @markerikson

@vercel
Copy link

vercel bot commented Aug 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
devtools ✅ Ready (Inspect) Visit Preview Aug 24, 2022 at 6:44PM (UTC)

members: "Team Members",
api: "API Keys",
};
setTab(views[view]);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was trying to derive the local state from the selected state - so I've just refactored this to use the actual selected state right from the start

@@ -130,7 +129,6 @@ const settings: Settings<
settings?: any;
isAdmin: boolean;
workspaceId: string;
hideModal: PropsFromRedux["hideModal"];
Copy link
Member Author

Choose a reason for hiding this comment

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

If I read this correctly... only TeamMembers were actually using hideModal so I've just moved it directly to it and cleaned this up from the parent components

@markerikson
Copy link
Collaborator

Thanks! I'll merge this probably early next week

@markerikson markerikson merged commit c68bdee into replayio:main Aug 24, 2022
@Andarist Andarist deleted the deconnectify-few-components branch August 24, 2022 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants