Uncaught ReferenceError: React is not defined
Crunchyman-ralph opened this issue · 0 comments
Crunchyman-ralph commented
Issue summary
Write a short description of the issue here ↓
Get this error:
Uncaught ReferenceError: React is not defined
When trying to import a React Component into index and trying to import that index inside a page
.
├── ...
├── components
│ ├── ProductsCard
│ ├── index.tsx
│ └── ProductsCard.tsx
└── ...
Expected behavior
What do you think should happen?
Should be able to compile correctly
Actual behavior
What actually happens?
Uncaught ReferenceError: React is not defined
Steps to reproduce the problem
- Create a Directory inside components
ProductsCard
for example - create an index.tsx file with
import * from './ProductsCard'
import {ProductsCard} from 'frontend/components/ProductsCart'
insidepages/index.tsx
- Will get an error
Uncaught ReferenceError: React is not defined
Reduced test case
The best way to get your bug fixed is to provide a reduced test case.
Specifications
- Browser: Chrome
- Device: Computer
- Operating System: Windows 10