react-native-view-shot
Let’s build a React Native app to display a simple screenshot of a view/scrollview etc.. The app will contain only one screen, and we are going to keep its functionality and styling to a minimum, since the purpose of this tutorial is to help you set up your React Native developer environment and Capture a React Native view to an image.
In this React Native tutorial, we are going to use react-native-cli in order to build your first React Native application.
1. Install React-Native-Cli
Follow the official documentation on how to install React-native. Once you’ve installed it, come back to this tutorial and follow the next steps in order to build your first React Native app.
2. Create a New React Native App
npx react-native init AwesomeProject
When it’s done, will work its magic and create all the necessary files for you. You can take a look at the directory structure to get an idea of what is going on in the project.
3. Run Your First React Native App
Run the following commands to start your newly created React Native app:
For android
npx react-native run-androidFor ios
npx react-native run-ios
At this point, if you set up React-Native_Cli properly at the previous steps, the new React Native project should have loaded successfully and you should be able to see the app as in the following screenshot:
That’s it!
Congratulations! You’ve successfully run and modified your first React Native app.
react-native-view-shot
Thank you for your patience. I hope it helps you.