Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>React Tsx Template FileNew to Visual Studio Code? Get it now.
React Tsx Template File

React Tsx Template File

Erwanede

|
416 installs
| (0) | Free
Add template to file with specific extension
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

React Tsx Template File README

This extension add template to file with specific extension. By default only tsx is handle with react.FC function template.

Features

When you create .tsx file, by default, it will add to it:

My Image

You can personalize tsx template or add another one by searching in workspace setting for "React-template-file" -> Edit in settings.json

My Image

You can add item in react-template-file.customSetting array for handling more extension. You can modify templateString. One item is one line in your file.

You can use ${fileName} in extension setting to get the filename of the file

Known Issues

  • None for now

Release Notes

1.0.0

  • Add simple react.FC function to .tsx file
  • Allow user to handle more extension

1.1.0

  • Add fileName variable as ${fileName} in extension setting
  • Handle extension priority

1.2.0

  • Add displayName to default template
  • Handle auto refresh of configuration on change
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft