Answer the question
In order to leave comments, you need to log in
Why is text not being rendered in a React component?
There is an array of objects, each of which has its own array of objects containing text.
When outputting through the console, the text is displayed, as it should be:
console.log(this.state.cars[0].tariffs[this.state.tariffs[0]]['year']);
. {this.state.cars.length && this.state.cars.map(item =>{
return (<div key = {item.mark+item.model} className='car-block'>
<div className='mark-model'>{item.mark} {item.model}</div>
<div className='tar-0'>{item.tariffs.length && item.tariffs[this.state.tariffs[0]]['year']</div>
</div>)})}
. How to fix it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question