Socket
Book a DemoInstallSign in
Socket

@kadira/babel-plugin-react-docgen

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kadira/babel-plugin-react-docgen

Add propType doc to react classes

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
1
-92.31%
Maintainers
6
Weekly downloads
 
Created
Source

babel-plugin-react-docgen

Add propType doc to react classes

Installation

$ npm install @kadira/babel-plugin-react-docgen

Usage

.babelrc

{
  "plugins": ["@kadira/babel-plugin-react-docgen"]
}

Via CLI

$ babel --plugins @kadira/babel-plugin-react-docgen script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["@kadira/babel-plugin-react-docgen"]
});

Guide

  • React class information is avalable via <ClassName>.__docgenInfo as a JSON parsabel string.
  • This plugin uses react-docgen under the hood, so every limitation it has, applies.
  • Only works classes extended from React.Component with a render() method. React.createClass and stateless components are not supported yet.

Keywords

react

FAQs

Package last updated on 20 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts