Search code examples
javascriptreactjstypescriptreact-native

Issue in JSX (TSX) Component React


I was working on React Native Project with Typescript. I got the issue with only index.tsx filename in ColoredDate folder. I also have same folders like Dialog & Search but those aren't throwing any errors

Folder Structure

- Root Of The Project
|
|
 --- components/
       |
       -- ColoredDate/
             |
             --- index.tsx

Here's The Error Error

Here's Folder Structure Folder Structure

If I change the filename from index.tsx to anything.tsx All issues resolved. But changing file name isn't the appropriate solution in my opinion.


Solution

  • It is probably a bug with your editor, try closing completely out of the editor and opening it back up.