2

For identifying each user i am trying to generate unique id at the time of registration in react native.How is it possible? Thanks in advance

Linu Sherin
  • 1,712
  • 7
  • 38
  • 88

2 Answers2

2

the best way is using an UUID generator. to install UUID generator use the two following cammands

$ npm install react-native-uuid-generator --save

$ react-native link react-native-uuid-generator

then import from 'react-native-uuid-generator'

import UUIDGenerator from 'react-native-uuid-generator';

for reference click here

Mujthaba
  • 25
  • 8
1

You can set a timestamp for every user as id, but uuid is the best solution.

Ali Eslamifard
  • 565
  • 3
  • 11