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

ref(js): useLegacyStore for config in AppRoot #29138

Conversation

evanpurkhiser
Copy link
Member

No description provided.

@@ -21,7 +17,9 @@ type Props = {
* TODO: There might be an edge case where user does not have `lastOrganization` set,
* in which case we should load their list of organizations and make a decision
*/
function AppRoot({config}: Props) {
function AppRoot() {
const config = useLegacyStore(ConfigStore);
Copy link
Member

Choose a reason for hiding this comment

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

does config need to be passed to the useEffect?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah might as well. I don't think it will make any difference since config won't ever update while this is mounted, but let's be exhaustive.

Copy link
Member

@priscilawebdev priscilawebdev left a comment

Choose a reason for hiding this comment

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

lgtm

@evanpurkhiser evanpurkhiser merged commit 42b6e35 into master Oct 7, 2021
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-js-uselegacystore-for-config-in-approot branch October 7, 2021 06:54
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants