Skip to content

RN Docs standards

Ayush Jain edited this page Aug 13, 2020 · 5 revisions

Standards

The project would involve following changes/standards to the documentation:

  • Remove asterisk from comments (JSDoc).

  • Update title and description of each component to sync it with corresponding markdown file in react-native-website.

  • @platform annotation for specifying the platform(s).

    Eg: @platform android, tv

  • @default annotation for default values of the props.

    Eg: @default false

    For default values on different platform use default with platform annotation.

    Eg:

    @default {@platform android}
    @default {@platform ios} '#007AFF'
    
  • Use @type annotation for platform dependent supported datatypes

    Eg:

    @type enum(‘small’, ‘large’)
    @type {@platform android} number
    
  • Follow markdown format for line breaks i.e., a single new line for the space and double new line for the line break.