Replies: 5 comments
-
Hey, thanks for trying React Native Canvas. Can you please add a null check for the canvas ref? if (canvas === null) {
return
} |
Beta Was this translation helpful? Give feedback.
-
Yep added the null check and canvas is not null. By the way, my versions are: react-native-cli: 2.0.1 |
Beta Was this translation helpful? Give feedback.
-
That is odd. Can you try to copy one of the examples and see if it works? |
Beta Was this translation helpful? Give feedback.
-
I copied the examples, only the images from the src show up. Nothing gets drawn on the canvas itself |
Beta Was this translation helpful? Give feedback.
-
Check out this Snack I made: https://snack.expo.io/KWT4nQlds It shows the drawing correctly in ios and android but not in web mode. Perhaps it's a bug? |
Beta Was this translation helpful? Give feedback.
-
Just want to test out the example but cannot get it to run in web.
I verified that I can get a drawing context by logging the result of
canvas.getContext('2d');
, and the fillStyle is purple, but nothing shows on the screen;ctx.fillRect(0, 0, 100, 100)
didn't do anything.To reproduce:
npm run web
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions