Skip to content

[internal] Make React context definitions consistent#735

Merged
michaldudak merged 5 commits intomui:masterfrom
michaldudak:consistent-context
Oct 17, 2024
Merged

[internal] Make React context definitions consistent#735
michaldudak merged 5 commits intomui:masterfrom
michaldudak:consistent-context

Conversation

@michaldudak
Copy link
Member

@michaldudak michaldudak commented Oct 14, 2024

Closes #520

@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
@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
@oliviertassinari oliviertassinari added internal Behind-the-scenes enhancement. Formerly called “core”. and removed core labels Aug 2, 2025
@oliviertassinari oliviertassinari changed the title [core] Make React context definitions consistent [internal] Make React context definitions consistent Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Behind-the-scenes enhancement. Formerly called “core”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[all components] Missing React.createContext displayName [internal] Standardize error messages across components

4 participants