VS Code

React Extract

React Extract takes a JSX or TSX selection and turns it into a function component, in the same file or a new one. Props are inferred from the variables the JSX uses, and the call site is replaced. The parser is bundled. There is no AI, no telemetry, and no network call.

Price and where to get it

Lite is free. Pro is $12 personal or $39 team, on Gumroad.

What it does

  • Lite handles fragments, event handlers, key, a hook warning, and imports copied into a new file.
  • Pro is $12 for a personal license and $39 for a team license, on Gumroad.
  • Pro adds a TSX props type, extract to a custom hook, split file into components, naming and export presets, and a CSS-module stub.