Topic: react login laravel

Júnior Oaks free asked 5 years ago


How I builder the login with react I get the error: ReferenceError: Component is not defined

import React from "react"; import ReactDOM from "react-dom"; import { MDBContainer, MDBRow, MDBCol, MDBInput, MDBBtn } from "mdbreact";

export default class Singin extends React { constructor() { const FormGet = () => { return ( Sign in

Login ); }; }

render() {
    return FormGet;
}

}

if (document.getElementById("singin")) { ReactDOM.render(, document.getElementById("singin")); }


Piotr Glejzer staff answered 5 years ago


Hi,
did you import Component from React library? You are using a render() method and you have to import Component from React or you have to extend a Reac.Component. You can see it in official React docs https://reactjs.org/docs/react-component.html

Best,
Piotr



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.19.2
  • Device: larvel
  • Browser: google
  • OS: mac
  • Provided sample code: No
  • Provided link: No