Search code examples
htmlreactjsreact-nativepng

HTML To PNG - React Native


I work on project like canva for make a canvas image to enable the user download the image as PNG.

All the action that user make display in middle of screen into ...all text and image element tag

What is the best practice to get png from html ? Right now I use html-to-png but it’s not a good package if the image in canvas is from can cloud.

Is someone know something better?

Thank you all !


Solution

  • if you are showing your html in react native, you can try this to make a view shot with react-native-view-shot, here is the repo https://github.com/gre/react-native-view-shot#react-native-view-shot-- it will give you an image of your specified view