mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
Remove error ref to the 'render' function (#8781)
What is the `render` function of a functional component?
This commit is contained in:
committed by
Brandon Dail
parent
85b5d37961
commit
f21d4f857c
@@ -73,7 +73,7 @@ class AutoFocusTextInput extends React.Component {
|
||||
}
|
||||
```
|
||||
|
||||
You may not use the `ref` attribute on functional components because they don't have instances. You can, however, use the `ref` attribute inside the `render` function of a functional component:
|
||||
You may not use the `ref` attribute on functional components because they don't have instances. You can, however, use the `ref` attribute inside the functional component:
|
||||
|
||||
```javascript{2,3,6,13}
|
||||
function CustomTextInput(props) {
|
||||
|
||||
Reference in New Issue
Block a user