NK
Size: a a a
NK
NK
ЮЧ
material-ui, но я еще не занимался вопросами производительности.withStyles оборачивает каждый компонент в библиотеке, может быть, с этим как-то связано?NK
NK
NK
NK
class Tracks extends Component {
constructor(props){
super(props);
this.trackInputElement = null;
this.addTrackElement = null;
this.trackInputRef = element => this.trackInputElement = element;
this.addTrackRef = element => this.addTrackElement = element;
}
handleClick() {
//console.log('this is:', this);
const trackName = this.trackInputElement.value;
}
render() {
return (
<div className="Tracks">
<h1>Песни</h1>
<input ref={this.trackInputRef} type="text" placeholder="введите трэк" required class="trackInput" />
<button ref={this.addTrackRef} class="addTrack" onClick={(e) => this.handleClick(e)}>Добавить</button>
<ul class="list">
</ul>
</div>
);
}
}ЮЧ
ЮЧ
NK
NK
ЮЧ
NK
ЮЧ
NK
ЮЧ
NK
NK
NK