Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@ require(["crypto-js"], function (CryptoJS) {
</script>
```

### Usage in React Native (>= [crypto-js 4.0.0](https://github.com/1Jesper1/crypto-js/edit/develop/README.md#400))

```javascript
import 'react-native-get-random-values';
import crypto from 'crypto-js';
```

1. Check inlineRequires: true in metro.config.js
2. ``npm i crypto-js``
3. ``npm i react-native-get-random-values``
4. ``cd ios/ && pod install``
5. Rebuild app
6. Add import 'react-native-get-random-values'; before crypto-js import. For example at the top of App.js.

See https://www.npmjs.com/package/react-native-get-random-values

## API

See: https://cryptojs.gitbook.io/docs/
Expand Down