Hellenic / react-hexgrid

Build interactive hexagon grids with React
https://hellenic.github.io/react-hexgrid/examples/
MIT License
318 stars 130 forks source link

The typing in the Layout component doesn't accept a mix of dynamic and static children #99

Closed EbokianKnight closed 2 years ago

EbokianKnight commented 2 years ago
Screen Shot 2022-08-27 at 8 38 22 AM

When dynamically adding tiles into the Layout component, the typing does not like it when you also add manual elements.

jannikbuschke commented 2 years ago

Am I guessing correct that when you put the Fragment outside of your .map(...) i.e.

<React.Fragment>{hexTiles.map(...)}</React.Fragment>
<Hexagon.../>

it works?

EbokianKnight commented 2 years ago

Yup