-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[RootRef] Remove component #21974
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -110,6 +110,19 @@ This change affects almost all components where you're using the `component` pro | |||||
/> | ||||||
``` | ||||||
|
||||||
### RootRef | ||||||
|
||||||
- This component was removed. | ||||||
eps1lon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
You can get a reference to the underlying DOM node of our components via `ref` prop. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. via the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean
Suggested change
? |
||||||
The component relied on [`ReactDOM.findDOMNode`](https://reactjs.org/docs/react-dom.html#finddomnode) which is [deprecated in `React.StrictMode`](https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage). | ||||||
|
||||||
```diff | ||||||
-<RootRef rootRef={ref}> | ||||||
- <Button /> | ||||||
-</RootRef> | ||||||
+<Button ref={ref} /> | ||||||
``` | ||||||
|
||||||
### Slider | ||||||
|
||||||
- typescript: The `event` in `onChange` is no longer typed as a `React.ChangeEvent` but `React.SyntheticEvent`. | ||||||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
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.