Summary
In this chapter, you learned that even if React Native lacks a feature you need, you'll be able to find a Native Module that suits your needs. In our case, we need camera support for our note taking the application and we showed you how to install a great third-party module via npm
. We created a new screen for our Camera component and wired it up to our note saving mechanism to store the path of the image that is captured. We then created a NoteImage
screen to view the captured image and added a way to delete the images we captured.
Facebook exposes native device functionality in exactly the same way that react-native-camera does. If you're curious, you can take a look at the very simple vibration module that ships with React Native: https://github.com/facebook/react-native/tree/master/Libraries/Vibration. Even if you do not consider yourself an Objective-C, Swift, or Java programmer, don't be afraid to try creating a Native Module yourself—you might be surprised by how easy it is...