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

[core] Make React context definitions consistent #735

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Oct 14, 2024

Closes #520

@michaldudak michaldudak added the core Infrastructure work going on behind the scenes label Oct 14, 2024
@mui-bot
Copy link

mui-bot commented Oct 14, 2024

Netlify deploy preview

https://deploy-preview-735--base-ui.netlify.app/

Generated by 🚫 dangerJS against 2521515

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 14, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 15, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 15, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 17, 2024
@michaldudak michaldudak merged commit 8c52af4 into mui:master Oct 17, 2024
18 checks passed
@michaldudak michaldudak deleted the consistent-context branch October 17, 2024 09:11
@oliviertassinari oliviertassinari changed the title [core] Make context definitions consistent [core] Make React context definitions consistent Oct 17, 2024
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Cool, thanks for the context display name fixes.

export const RadioRootContext = React.createContext<RadioRootContext | null>(null);
export const RadioRootContext = React.createContext<RadioRootContext | undefined>(undefined);
Copy link
Member

Choose a reason for hiding this comment

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

set default value of contexts to undefined (was a mix of undefined and null previously)

Ok, so a new standard. I think we can standardize on this in Material UI and X too.

atomiks pushed a commit to atomiks/base-ui that referenced this pull request Oct 30, 2024
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.

[dx] Missing React.createContext displayName [core] Standardize error messages across components
4 participants