Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

React refs is being deprecated. Consider changing it to **createRef** API. #249

Open
raamb opened this issue Apr 30, 2019 · 0 comments
Open

Comments

@raamb
Copy link
Member

raamb commented Apr 30, 2019

this.refs is being deprecated. You might consider changing it to createRef API.

class MyComponent extends React.Component {
  constructor(props) {
    super(props);
    this.myRef = React.createRef();
  }
  render() {
    return <div ref={this.myRef} />;
  }
}

Originally posted by @Vivek205 in https://github.com/singnet/snet-dapp/pull/240/files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant