4 ms·
Just a question. Why would you create a new button component when the only thing it does is return a <button> html element with text inside. Why not just do {li
by jkol36 10y ago
Just a question. Why would you create a new button component when the only thing it does is return a <button> html element with text inside. Why not just do {listitems.map(listitem) => {return (<button> {listitem.text}</button)}}. I think react facilitates unnecessary boiler plate logic like that. When in reality a component should probably do more in order to save code if it's going to be created at all. Just my opinion. Open to other people's thoughts on this.