-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension removes global React from imports #19
Comments
I need to detect if you are using the new JSX transform that doesn't require importing React or not. The native "Organize Imports" from VS Code detects this when you are in a project, so I suppose it is possible. Another option would be to add a new setting to exclude some imports that could be set per project. Let me think about this. In the meantime you can use React in your code ( |
I have the same question. Maybe add a new setting to exclude some words is a better way :) the temporary way I used is creating a global snipptes. |
I started working on this but I haven't had time to finish. My idea for this is to work the same than native VS Code Organize Imports, that is React import is removed or not depending on the So, if you have {
"compilerOptions": {
"jsx": "react"
}
} For me, this is the most convenient because the desired behavior depends on the project settings (if you are using or not the new JSX transform). If the behavior depends on an extension setting, then you'll probably need to add a workspace settings per project ( |
Hello! Any news on this? |
@savissimo sorry, not yet. I'll have some free time in August to continue working on this. |
Would it be possible to have a .config.json to include imports that you do not want automatically deleting? |
In order to write React components you need to import React from react.
This extension removes it, when optimizing imports.
The text was updated successfully, but these errors were encountered: