forEach() in React JSX does not output any HTML
You need to pass an array of element to jsx. The problem is that forEach does not return anything (i.e it returns undefined). So it’s better to use map because map returns an array:
You need to pass an array of element to jsx. The problem is that forEach does not return anything (i.e it returns undefined). So it’s better to use map because map returns an array:
You rewrite the context of the class method when you pass it to props like this because of JS OOP system. So to make it work there are several approaches: 1) This is not so good because bind always returns new function and your component will re-render even if there are no updates in props … Read more