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] Simplify isReactVersionAtLeast() #1047

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 11, 2024

Same as mui/material-ui#43820

parseInt('19.0.0-rc.12131', 10); // returns 19

Off topic. I could see us creating an internal helper and exposing fit from Base UI, this duplication feels off:

A possible path:

  • We remove isReactVersionAtLeast() no need for an abstraction of: >=.
  • We expose majorVersion from @base-ui-components/internal/majorVersion
  • Everything else starts to use it.

The value is then only about abstracting parseInt(React.version, 10) into something simpler.

If we are worried about the coupling of Base UI / Material UI / MUI X (I don't understand this as I think it's a great thing, it forces Base UI to be anchored into its product purpose) but ok, we could replicate the same structure. I see no reason for this to be different.

@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Dec 11, 2024
@mui-bot
Copy link

mui-bot commented Dec 11, 2024

Netlify deploy preview

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

Generated by 🚫 dangerJS against 935e343

@oliviertassinari oliviertassinari changed the title [core] Simplify isReactVersionAtLeast [core] Simplify isReactVersionAtLeast() Dec 11, 2024
@oliviertassinari oliviertassinari merged commit 71e1459 into mui:master Dec 12, 2024
23 of 24 checks passed
@oliviertassinari oliviertassinari deleted the bundle-size branch December 12, 2024 21:38
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.

3 participants