55
rated 0 times
[
60]
[
5]
/ answers: 1 / hits: 89011
/ 6 Years ago, sun, august 5, 2018, 12:00:00
I was trying to do this.
I must be missing something, but I don't understand why current
is always null
in this example.
class App extends React.PureComponent {
constructor(props) {
super(props);
this.test = React.createRef();
}
render() {
return <div className=App>current value : {this.test.current + }</div>;
}
}
You can check my test case here
More From » reactjs