key={currencies.symbol} value={currencies.symbol}const item = localStorage.getItem('symbol');componentDidMount(){
this.Data = JSON.parse(localStorage.getItem('data'));
if(localStorage.getItem('data')){
this.setState({
currentSymbol: this.Data.currentSymbol
})
} else {
this.setState({
currentSymbol: "$ USD"
})
}
}
componentWillUpdate(nextProps, nextState){
localStorage.setItem('data', JSON.stringify(nextState))
}let selecteds = this.props.selectValue;<div>
<div className={s.select}>
<select >
{this.state.currencies.map((currencies) =>(
<option selecteds >
<div className={s.option}>
{currencies.symbol} {currencies.label}
</div>
</option>
)
)
}
</select>
</div>
</div> CountId = (event) => {
this.setState({
countId: {
...this.state.countId, countId: Object.assign({},{id:(event.currentTarget.id), quantity:1})
}
})
} CountId = (event) => {
this.setState({
countId: {
...this.state.countId, countId: {id:(event.currentTarget.id), quantity:1}
}
})
}<div onChange={this.QuantityChange}>. Я сюда добавил код из разных компонентов, в том числе, что тестировал. Это первый мой вопрос на Хабре еще не освоился. Подскажите, что я делаю не так?