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

[RootRef] Remove component #21974

Merged
merged 4 commits into from
Jul 29, 2020
Merged

[RootRef] Remove component #21974

merged 4 commits into from
Jul 29, 2020

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jul 28, 2020

Breaking change

  • This component was removed. You can get a reference to the underlying DOM node of our components via ref prop.
    The component relied on ReactDOM.findDOMNode which is deprecated in React.StrictMode.

    -<RootRef rootRef={ref}>
    -  <Button />
    -</RootRef>
    +<Button ref={ref} />

RootRef is no longer needed for our components nor used internally. If people still need this component they can copy the old source.

Follow-up:

  • add deprecation warning

@eps1lon eps1lon added breaking change package: material-ui Specific to @mui/material labels Jul 28, 2020
@eps1lon eps1lon added this to the v5 milestone Jul 28, 2020
@mui-pr-bot
Copy link

mui-pr-bot commented Jul 28, 2020

@material-ui/core: parsed: -0.47% 😍, gzip: -0.60% 😍
@material-ui/lab: parsed: -0.00% 😍, gzip: +0.30%

Details of bundle changes

Generated by 🚫 dangerJS against 4e1be3a

### RootRef

- This component was removed.
You can get a reference to the underlying DOM node of our components via `ref` prop.
Copy link
Member

Choose a reason for hiding this comment

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

via the ref prop?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean

Suggested change
You can get a reference to the underlying DOM node of our components via `ref` prop.
You can get a reference to the underlying DOM node of our components via the `ref` prop.

?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 28, 2020
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
@eps1lon eps1lon removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 29, 2020
@@ -102,8 +102,6 @@ module.exports = {
'react/no-array-index-key': 'off',
'react/no-danger': 'error',
'react/no-direct-mutation-state': 'error',
// Required for backward compatibility. TODO v5, drop
'react/no-find-dom-node': 'off',
Copy link
Member

Choose a reason for hiding this comment

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

Cool, I have created a note to remove that rule from the material-ui-x repository.

@eps1lon eps1lon merged commit 64de0cd into mui:next Jul 29, 2020
@eps1lon eps1lon deleted the feat/RootRef/remove branch July 29, 2020 18:38
oliviertassinari added a commit to oliviertassinari/mui-x that referenced this pull request Aug 1, 2020
oliviertassinari added a commit to oliviertassinari/mui-x that referenced this pull request Aug 1, 2020
oliviertassinari added a commit to oliviertassinari/mui-x that referenced this pull request Aug 2, 2020
oliviertassinari added a commit to oliviertassinari/mui-x that referenced this pull request Aug 2, 2020
@eps1lon eps1lon mentioned this pull request Aug 5, 2020
42 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants