track - это hash Map.
class PointsMaker extends Component {
shouldComponentUpdate(nextProps) {
return nextProps.update
}
render() {
const track = this.props.track;
const update = this.props.update;
if (track.length !== 0 && update) {
this.props.shouldUpdate(false);
track.forEach((value, key) => {
if (value.length !== 0)
return (
<VehicleMarker target={key}/>
);
else return null;
});
}
else {
return null;
}
}
}
А как по другому можно перебрать массив и выдать компонеты?
Продвижение своими сайтами как стратегия роста и независимости