React Native and TypeScript

Draqula supports React Native out-of-the-box, but there are a few extra steps needed if you're using TypeScript.

  • Make sure you are using Draqula v0.5.3 or higher
  • Update TypeScript config to include AsyncIterableIterator type

Add esnext.asynciterable to compilerOptions.lib in tsconfig.json:

2 "compilerOptions": {
3 "lib": ["es6", "esnext.asynciterable"]
4 }
  • Patch ky to not include DOM types

First, install patch-package and set up a postinstall script according to instructions in its readme.

Afterwards, download a ky patch (compatible with ky@0.12.0 as of this writing) and put it in patches folder:

1$ mkdir patches
2$ curl > patches/ky+0.12.0.patch
3$ npx patch-package