Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-remove-react-fc-and-vfc

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-remove-react-fc-and-vfc

This plugin removes React.VFC and React.FC annotation

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-remove-react-fc-and-vfc

release License: MIT npm version

This plugin removes React.VFC and React.FC annotation.

Input:

const Component: React.FC<Props> = (props) => {
  return <div>{props.value}</div>;
};

Output:

const Component = (props: Props) => {
  return <div>{props.value}</div>;
};

Why?

As React.XXX is modified frequently like React.SFC was removed or the children type will be removed from React.FC, I think we should not use React.XXX type as much as possible.

See more details

Install

$ npm install --save-dev babel-plugin-remove-react-fc-and-vfc

and add it to your .babelrc.

{
  "plugins": ["remove-react-fc-and-vfc"]
}

Contributing

Welcome your contribution!

See also Babel Plugin Handbook.

Setup

$ git clone git@github.com:nissy-dev/babel-plugin-remove-react-fc-and-vfc.git
$ cd babel-plugin-remove-react-fc-and-vfc
$ npm ci

Development Tools

// run tsc, eslint, prettier
$ npm run lint

// run test
$ npm run test

Keywords

FAQs

Package last updated on 21 Nov 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc