Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/welldone-software/react-component-splitter
React VSCode Extension that splits long components into shorter, more readable subcomponents
https://github.com/welldone-software/react-component-splitter
Last synced: 11 days ago
JSON representation
React VSCode Extension that splits long components into shorter, more readable subcomponents
- Host: GitHub
- URL: https://github.com/welldone-software/react-component-splitter
- Owner: welldone-software
- Created: 2020-04-24T12:19:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T09:53:58.000Z (almost 2 years ago)
- Last Synced: 2024-07-31T08:16:21.070Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.3 MB
- Stars: 32
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome - welldone-software/react-component-splitter - React VSCode Extension that splits long components into shorter, more readable subcomponents (JavaScript)
README
# React Component Splitter
This extension allows to easily split long React components into sub-components.
## Usage:
**1**. Select the code you want to export to a new sub-component.
**2**. Choose `Split to New Component` from the Right-Click Menu / Command Palette.
**3**. Enter a name for the new sub-component.
![enter image description here](https://raw.githubusercontent.com/welldone-software/react-component-splitter/master/src/assets/example.gif)
## Notes:
- The new component should is created inside the current component folder
- The selected code represents a valid jsx of React component(s)
- Imports and variables that become unused after splitting, will be deleted from the original component and re-imported in the new component
## Reporting Bugs:
If you find a bug or malfunction, or have any other comments, please open a github issue (with specific code example).