-
Notifications
You must be signed in to change notification settings - Fork 12.8k
React Native <Text> component quick fix weird import suggestion #33511
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
Comments
I have this bug too! |
This bug still exists and it’s kinda weird. Maybe somehow we can help to fix it? |
@a-tarasyuk @sandersn TS: 5.6.3 problem still exists unfortunately :( As you can see if I use Quick Fix it doesn't have ![]() How I can avoid this, because it is really frustrating since in React Native this is most used component. |
I can't remember--does react-native require your tsconfig's |
@sandersn Even if I use |
@a-tarasyuk @sandersn You were right, that the problem was with tsconfig... Seems like problem was not only with Sorry for the chaos 😄 |
Uh oh!
There was an error while loading. Please reload this page.
*Templated added by @mjbvz
TypeScript Version: 3.7.0-dev.20190919
Search terms
original issue below
Very weird issue... In React Native if you write
<Text></Text>
and you useQuick Fix...
on the first<Text>
you will getImport default 'React' from "react"
, but if you useQuick Fix...
on the second</Text>
(closing) you will getImport 'Text' from module "react-native"
(which is correct).It's hard to describe the issue so these screenshots will explain everything.
I expect to get the same behavior like with
</Text>
(closing) if I use Quick Fix on the<Text>
(opening).Steps to Reproduce:
yarn add react react-native @types/react @types/react-native
tsconfig.json
with the content below.App.tsx
with the content below.<Text>
and pressCMD+.
or useQuick Fix...
from Command Palette.tsconfig.json
package.json
App.tsx
The text was updated successfully, but these errors were encountered: