Skip to content
Myr

Update RN docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent 956452a · Browse files · 3 files+14 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+14 added−10 removed

  • tests:+1 added−0 removed
  • other:+13 added−10 removed

3 files+14 added−10 removed

modified:test/react-native.test.js+1 added
modified:index.browser.js+7 added-3 removed
modified:README.md+6 added-7 removed
187 unmodified lines
188### React Native189190React Native doesn’t have built-in random generator.1911921. Check [`expo-random`] docs and install it.1932. Use `nanoid/async` instead of synchronous `nanoid`.1921. Check [`react-native-get-random-values`] docs and install it.1932. Import it before Nano ID.194195```js196const nanoid = require('nanoid/async')197198async function createUser () {199 user.id = await nanoid()200}196import 'react-native-get-random-values'197import nanoid from 'nanoid'198```199200[`react-native-get-random-values`]: https://github.com/LinusU/react-native-get-random-values201202203### PouchDB and CouchDB204205In PouchDB and CouchDB, IDs can’t start with an underscore `_`.206A prefix is required to prevent this issue, as Nano ID might use a `_`
182 unmodified lines