Open tijs opened 4 years ago
The screenshot functionality is only used if you open a form that has a screenshot element inside it. So to use it you have to create a form in our platform with a screenshot type element added to it.
Since v1.0.0 we specified react-native-view-shot
as a peerDependency (previously it was a dependency) and as such you should be able to skip installing it. This means that you wont be able to use the screenshot element in our form builder though.
@Anwardo i could only run the app with the dependency installed so i'm guessing you still have a direct dependency to this code somewhere. Maybe try it out with a clean install and you should get a redbox error like i did.
Ah yeah I see. Though it's specified as a peerDependency it's not conditionally imported in the codebase so it will still error if not present. This is a good enhancement for a new release. But as of now it's not possible yet.
Ok, good that's it's on the radar at least. We do not need the screen shot functionality so i'd prefer to remove the dependency. I'll leave it up to you to close the issue now or when a new release is available then.
@Anwardo I have upgraded mopinion to 2.0.1 and I noticed that you now have the same issue with react-native-image-picker. if I upgrade mopinion my project will no longer run since it misses the react-native-image-picker dependency. if this is a dependency it should be added to your package.json file. now I have to add dependencies to our projects for which it is unclear where or how they are used.
This package includes a peer dependency on
react-native-view-shot
and i noticed some code for screenshots in the Deployment component. I have added that dependency to my project since it won't build otherwise, but i don't see any documentation on how to use this feature.