forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
I have a react component which looks like this:
class SignIn extends React.Component {
state = {
username: '',
password: '',
remember: false
}
usernameChange = (e) => {
this.setState({ username: e.target.value })
}
passwordChange = (e) => {
this.setState({ password: e.target.value })
}
render () { /* ... */ }
}
The included babel parser causes a compile error:
Failed to compile.
./src/components/login/login.js
Line 57: 'state' is not defined no-undef
Line 63: 'usernameChange' is not defined no-undef
Line 67: 'passwordChange' is not defined no-undef
Search for the keywords to learn more about each error
I'm having trouble figuring out what's going wrong here. My env file:
REACT_APP_DECORATORS = true
REACT_APP_BABEL_STAGE_0 = true
REACT_APP_SASS = false
REACT_APP_LESS = false
REACT_APP_STYLUS = true
REACT_APP_CSS_MODULES = true
REACT_APP_SASS_MODULES = false
REACT_APP_STYLUS_MODULES = true
REACT_APP_LESS_MODULES = false
REACT_APP_WEBPACK_DASHBOARD = false
# CSS Module hash
# REACT_APP_CSS_MODULE_CLASSNAME_TEMPLATE = 'module-[sha512:hash:base32]-[name]-[local]'
Metadata
Metadata
Assignees
Labels
No labels