Bind onClick , onBlur Events to Canvas #957
-
Hi, I'm using skia-react-native on the web, for my use case I need to bind onBlur and onClick events to the Canvas. |
Beta Was this translation helpful? Give feedback.
Answered by
wcandillon
Sep 26, 2022
Replies: 1 comment
-
If you add a ref to your ref.current._canvasRef.current const ref = useRef(null);
useEffect(() => {
console.log(ref.current._canvasRef.current);
}, [ref]);
return (
<Canvas ref={ref}>
<Fill />
</Canvas>
); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Sundarcj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you add a ref to your
Canvas
you can access the html element via: