I\'m having trouble with this logic since react/jsx does not allow for non closing tags to be added to an array/child component. For example with bootstrap css I want to add
I actually just used arrays and react handled fine the rendering.
render() { let rows = [], cols = [] let index = 0 const totalCols = 20; for (index; index < totalCols; index++) { cols.push() if ((index + 1) % 4 == 0) { rows.push( {cols} ) cols = [] } } return ( {rows} ) } 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复