Skip to content

Commit

Permalink
Fix uuid usage
Browse files Browse the repository at this point in the history
Import react-native-get-random-values _before_ importing App (which in
turn imports uuid). As documented in
https://github.com/uuidjs/uuid#react-native

Fixes uuidjs/uuid#514
  • Loading branch information
ctavan committed Sep 11, 2020
1 parent ee13200 commit 9d54799
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @format
*/

import 'react-native-get-random-values';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
console.disableYellowBox = true;
import 'react-native-get-random-values';

AppRegistry.registerComponent(appName, () => App);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"uuid-random": "^1.3.2"
"uuid": "^8.3.0"
},
"devDependencies": {
"@babel/core": "^7.11.4",
Expand Down
2 changes: 1 addition & 1 deletion src/screens/AddDog.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ImagePicker from 'react-native-image-picker';
import RNPickerSelect from 'react-native-picker-select';
import {Icon} from 'react-native-ui-kitten';
import database from '@react-native-firebase/database';
import uuid from 'uuid-random';
import {v4 as uuid} from 'uuid';

import {dogBreeds} from '../components/DogBreeds';
import {range} from '../utils/HandyTools';
Expand Down
7 changes: 1 addition & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7274,19 +7274,14 @@ utils-merge@1.0.1:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=

uuid-random@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/uuid-random/-/uuid-random-1.3.2.tgz#96715edbaef4e84b1dcf5024b00d16f30220e2d0"
integrity sha512-UOzej0Le/UgkbWEO8flm+0y+G+ljUon1QWTEZOq1rnMAsxo2+SckbiZdKzAHHlVh6gJqI1TjC/xwgR50MuCrBQ==

uuid@^3.3.2:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==

uuid@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea"
resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea"
integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==

v8-compile-cache@^2.0.3:
Expand Down

0 comments on commit 9d54799

Please sign in to comment.