Skip to content

Install docs for react-native #332

Open
@mo22

Description

@mo22

For typescript design:type metadata to be avaliable in react-native it is required to add some plugins to babel.config.js:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    'babel-plugin-transform-typescript-metadata',
    ['@babel/plugin-proposal-decorators', { legacy: true }]
  ],
};

Without this most transform still run fine but some produce different, weird results (a Map with Type() annotation for example).

Might make sense for the react-native (or babel) folks to add a section to the install docs with a hint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: documentationIssues related to improving the documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions