How to take screenshot and share it in react native

Here we will take a screenshot of the screen or part of the screen and share it on the share api.

import ViewShot from ‘react-native-view-shot’;

Which we use further for our usecase such as sharing it directly.