I'm enjoying learning about KonvaJS with react and typescript.
I have a click handler on component that will create a new star at the x and y coordinates where it was clicked. It does this by adding the x and y coords to state.
That coord array is mapped over which renders the stars in the layer.
What I want to know is for recommended ways for the Stage component to know whether a blank space has been clicked or if a star has been clicked.
If a star has been clicked I want to remove it from state, but currently the stage is adding a new star there.
Is there a way for a child component, a star, to communicate up to its grandparent, the stage, letting it know it has been clicked, and therefore remove this star, not add another?