Home Reference Source Repository
import ComponentLogin from 'learnenergy401/component/ComponentLogin.js'
public class | source

ComponentLogin

Extends:

react~Component → ComponentLogin

Method Summary

Public Methods
public

Invoked immediately before a component is unmounted and destroyed, to update our states

public

Gets the current user

public

logInUser(user: object)

State changes if a user is logging

public

takes in the user email and password and logs in the user

public

render(): html

Loads the card with login in form.

Public Methods

public componentWillMount() source

Invoked immediately before a component is unmounted and destroyed, to update our states

public getCurrentUser(): object source

Gets the current user

Return:

object

user - Returns current user into state current user

public logInUser(user: object) source

State changes if a user is logging

Params:

NameTypeAttributeDescription
user object

object returns the user state changed to logged in

public loginSubmit() source

takes in the user email and password and logs in the user

public render(): html source

Loads the card with login in form.

Return:

html

returns buttons, email and password Textfield