Unable to resolve module crypto in react-native

Hi
I am trying to follow the below example in react-native, but it gives me an error for crypto. Any suggestion of how to use libp2p in react-native?

example: js-libp2p/index.js at master · libp2p/js-libp2p · GitHub

Error in react-native:

" const crypto = require(‘crypto’)
| ^
Unable to resolve module crypto from …\node_modules\libp2p-crypto\src\hmac\index.js: crypto could not be found within the project"