Following the barrel export pattern in React is a great way to organize your code. This extension will help you create barrel exports for your React components with a simple click.
- Open the index.js/index.ts file in the folder you want to create a barrel export for.
- Open the command palette by
Ctrl+Shift+P
orCmd+Shift+P
and search forGenerate Barrel Export
. - Enter the name of component you want to create a barrel export for.
- A new folder will be created with the name of the component and an index.js/index.ts file will be created inside the folder.
- The extension will automatically import all the files in the selected folder and export them.
- Create barrel export for React components
- Separate component generation snippet for JavaScript and TypeScript
- VS Code 1.41.0 or higher
- React Project (JavaScript or TypeScript)
Users appreciate release notes as you update your extension.
- Initial release of React Barrel Export
- Create barrel export for React components
- Separate component generation snippet for JavaScript and TypeScript
- Bugfix : new line issue fix in index file
- Feature : Added named import for React Function Component
Created by Tirth Patel
Enjoy coding!