1
Reaguj na foreach w JSX
Mam obiekt, który chcę wyprowadzić za pośrednictwem REACT question = { text: "Is this a good question?", answers: [ "Yes", "No", "I don't know" ] } a mój składnik reagowania (zmniejszony) jest kolejnym składnikiem class QuestionSet extends Component { render(){ <div className="container"> <h1>{this.props.question.text}</h1> {this.props.question.answers.forEach(answer => { console.log("Entered"); //This does ifre …
114
reactjs
react-props