You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using import {Component} from 'react' and the component class using extends Component an error "React is not defined" is returned. I have to use import React from 'react' and the component class using extends React.Component. It must depend on the whole module rather than the destructuring?
Steps to reproduce
import {Component} from 'react'
class X extends Component
Expected result
No error should be returned and the code should compile.
Actual result
"React is not defined"
The text was updated successfully, but these errors were encountered:
Ah yes, of course. Normally the boilerplate is there but I typed this one out, thinking that if I'm not using it, why do I need it. This is not a Gatsby thing, but I don't care about the transpilation, I'm writing at this level of abstraction, so would be nice not to include it, but yeah that's Reactland stuff.
Description
When using
import {Component} from 'react'
and the component class usingextends Component
an error "React is not defined" is returned. I have to useimport React from 'react'
and the component class usingextends React.Component
. It must depend on the whole module rather than the destructuring?Steps to reproduce
import {Component} from 'react'
class X extends Component
Expected result
No error should be returned and the code should compile.
Actual result
"React is not defined"
The text was updated successfully, but these errors were encountered: