aaronzshey / react-hexgrid

Build interactive hexagon grids with React
https://main--66a5393443e58f4dc4f0ca6b.chromatic.com/
MIT License
1 stars 0 forks source link

Extend hex type to be more like Hexagon #40

Closed aaronzshey closed 4 weeks ago

aaronzshey commented 1 month ago

To effectively use a hook, something like:


const [initialHexagons, setHexagons] = useState(hexagons)

onMouseOver = {() => {

if initialHexagons.distanceFrom(parent) == 1 {

hexagon.props.style = {{style: fill: blue;}}

}

}}

has to be implemented. Right now, Hexagon has way more props than Hex. These should be unified under a HexProps def or something.