Installation

Getting the library

npm install react-native-realm-schema

or using yarn:

yarn add react-native-realm-schema

Configuring your project

  1. Enable decorator feature in tsconfig.json
{
  "compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true
  }
}
  1. Using @babel/plugin-proposal-decorators:
  module.exports = {
    // ...
    plugins: [
        [
        '@babel/plugin-proposal-decorators',
        {
            legacy: true,
        },
        ],
    ]
    }