lundi 30 septembre 2019

Laravel React authentication

I'm new to react, what I'm trying to achieve is user login using react components in laravel.

https://github.com/000kelvin/laravel-react-authentication

I followed this and I installed everything.When I'm running this project I seem to get error regarding prop. Terminal asked me to update react and react-dom that I already updated

Laravel 5.8; npm 6.4.1; react@16.2.0; react-dom@16.2.1

import LoginContainer from './LoginContainer';
import {withRouter} from "react-router-dom";
class Login extends Component {
  constructor(props) {
    super(props);
    this.state = {
      redirect: props.location,
    };
  }
  render() {
    return (
      <div className="content">
        <LoginContainer redirect={this.state.redirect} />
      </div>
    )
  } 
}
export default withRouter(Login)

Showing out this Error:

Warning: Failed prop type: Invalid prop 'component' supplied to 'Route': the prop is not a valid React component in Route (created by Testlog) in Testlog



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2mbBNMf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire