1.0.7 • Published 4 years ago

react-native-uuids v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

React Native UUID

react-native-uuids is a simple library to create Native RFC-4122 V4 UUIDs. The package is both Android and iOS compatible.

Getting started

yarn add react-native-uuids
# or with npm
npm install react-native-uuids

Mostly automatic installation

For React-Native >= 0.60 this module will be linked automatically.

cd ios && pod install

Before 0.60 react-native-uuids can be manually linked.

react-native link react-native-uuids

Usage

import React, {useState} from 'react';
import {Text} from 'react-native';
import UUID from 'react-native-uuids';

const Home: () => React$Node = () => {
  const [uuid, setUuid] = useState(null);

  if (!uuid) {
    UUID.create((error, createdUuid) => {
      if (error) {
        console.error(error);
      } else {
        setUuid(createdUuid);
      }
    });
  }
  return <Text>{uuid}</Text>;
};

export default Home;
1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago