I'm using the react-native-macOS package but this package doesn't have usable documents for the macOS side. Normally, the react-native-macOS package has a Screenshot native component and they can use that component but when I wanna use it the way they use it:
const ScreenshotManager = NativeModules;
In takeScreenshot function :
ScreenshotManager.takeScreenshot('window', {format: 'jpeg', quality: 0.8})
.then(uri => setURL(uri))
.catch(error => console.log(error));
I can't use it because it says there is not like this component in my project but if I test the Screenshot component to RNTester folder in the react-native-macOS repo, everything is fine :/
Have you ever use this component or package before? How can I solve this problem?
Thanks for your help in advance
question from:
https://stackoverflow.com/questions/65540926/how-can-i-use-snapshot-screenshot-native-module-in-react-native-macos 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…