Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
throwaway290
· 3y ago · 0 comments
If it doesn’t have fragments, how do you implement something equivalent to this when mapping over items and every item has to output multiple roots?
<React.Fragment key={idx}>
Comments
[–]
anton96
3y ago
You can import the Fragment component of the React package or stack them directly, it works too. Normally, the empty bracket syntax should work, they have a few issues closed and open that talk about it in their repo.
[–]
throwaway290
OP
3y ago
Thanks! Interesting stuff