Next, we will be adding the truffle box code from part 1 into the react-native project.
Adding Truffle Box And Required Libraries To react Native Project
There are a few libraries that are required to get react-native ready for web3js and other blockchain-like capabilities like node-libs-react-native( provides React Native compatible implementations of Node core modules like stream and http ), vm-browserify(emulate node’s vm module for the browser), Base64(polyfill for browsers which don’t provide window.btoa and window.atob), react-native-randombytes (random bytes generators).
Run the following cmd within the react-native project, some of them might need later configuration for build the app(check their npmjs pages for further instructions), for now, they will be sufficient. I am using node v12.11.1