4 ms·
In case the blog authors are reading, there is an error in the JS example. {Array(props.total).fill(1).map((el, i) => <li key={i}>{{i
by filoeleven 4y ago
In case the blog authors are reading, there is an error in the JS example.
{Array(props.total).fill(1).map((el, i) =>
<li key={i}>{{item + i}}</li>
)}
“props.total” has no business being in a functional component where “props” is not defined, and that makes it hard to understand the mapping to (map-indexed vector options) in the CLJS example.
- bastawhiz 4y agoIt seems like they just forgot to massage the examples they pulled this from to include 'total' in the prop destructuring.