Как получить доступ к переменным от render () до внешней стороны render () в классе Creact Component
// React
class Parent extends React.Component {
constructor(props) {
super(props);
this.name = props.name
}
render() {
return (
<h1>
{this.name}
</h1>
);
}
}
Calm Caracal