Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //App.js
- import Button from Button.js
- class App {
- ref = React.createRef();
- componenentDidMount() {
- this.button.focus();
- }
- render() {
- return (<InputText ref={this.button}/>);
- }
- }
- //InputText.js
- export default class InputText {
- render() {
- return (<input type="text"/>);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement