- Select code you want to extract
- Ctrl + Shift + P to run command pallete
- Select "Smart Extract React Component"
- Input new component name
- Your new component is created. All imports and props are handled by the Smart React Component Extractor!!!
It’s not always possible to keep code clean and declarative. After a dozen commits, your components become huge and unreadable. And then comes refactoring. You split component into smaller ones. It takes time. You can't just Ctrl-X Ctrl-V. So I decided to write extension, which will help you refactor React components
https://marketplace.visualstudio.com/items?itemName=proverbialninja.svelte-extractor
Example: <Button color={darkTheme ? black : white} />
Expected: detect darkTheme, black, white variables
Actual: detects darkTheme, white variables
TODO: Add example and write tests for this case
Initial release of alpha version of extension