I'm currently writing a StencilJS component with a ref
to a element, which I need to pass as a @Prop to another element. Like so:
<canvas ref={el => this.canvas = el}></canvas>
<color-picker canvas={this.canvas}></color-picker>
When the color picker gets created, the this.canvas
is still undefined, resulting in an error in color-picker
.
How can I do this in JSX?