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
I am using React-Redux starter kit & trying to implement only Login Authentication.
In the App page: I am getting error. 'login' defined but never used & same error for 'loginUser' action.
Even I am getting error:
Uncaught TypeError: Cannot read property 'isAuthenticated' of undefined
This is my code:
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import Navbar from './Navbar'
import Login from './Login'
import { loginUser } from './redux/module/action'
I am using React-Redux starter kit & trying to implement only Login Authentication.
In the App page: I am getting error. 'login' defined but never used & same error for 'loginUser' action.
Even I am getting error:
Uncaught TypeError: Cannot read property 'isAuthenticated' of undefined
This is my code:
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import Navbar from './Navbar'
import Login from './Login'
import { loginUser } from './redux/module/action'
class App extends Component {
render () {
const { dispatch, isAuthenticated, errorMessage } = this.props
return (
)
}
}
App.propTypes = {
dispatch: PropTypes.func.isRequired,
isAuthenticated: PropTypes.bool.isRequired,
errorMessage: PropTypes.string
}
function mapStateToProps (state) {
const{ auth } = state
const { isAuthenticated, errorMessage } = auth
return {
isAuthenticated,
errorMessage
}
}
export default connect(mapStateToProps)(App)
The text was updated successfully, but these errors were encountered: