react map 스트리밍, react native map 스트리밍
2354 단어 프런트엔드
4
{this.state.images.map((img, i) => {
return (
Updated:{img.left ? img.left.date : img.right.date}
);
})}
혹은
{this.props.socks &&
this.props.socks.map((sock, i) => {
let randomId = Math.round(Math.random() * 10000);
let sockDiv = (
{sock.mac}
{sock.sn}
{sock.authCode}
{sock.foot}
);
return sockDiv;
})}
4
{this.props.forecastList && this.props.forecastList.daily_forecast && this.props.forecastList.daily_forecast.map((infor, i) => {
let weatherDiv =(
{infor[i]&&infor[i].date.split("-")[2]}
{(infor[i]&&infor[i].cond.txt_n) === " " ? : null}
{infor[i]&&infor[i].cond.txt_n}
{infor[i]&&infor[i].tmp.min}~{infor[i]&&infor[i].tmp.max}℃
);
return weatherDiv
})}