Reference Source
public class | source

LoginView

Extends:

* → LoginView

Class for the Login view

Static Member Summary

Static Public Members
public static

Constructor Summary

Public Constructor
public

Create an instance of LoginView

Member Summary

Public Members
public

LoginP: *

public

Component will unmount after this method is called, do any clean up here Call viewUnmounting in base class so it can do any cleanup for the view before calling the presenter destroy method

public

Handle an incorrect login by displaying an alert

public

Navigate to the tabs screen.

public

onError(message: string): *

Alert popup with a message.

public

Refreshes the state of the component so new data is fetched.

public

Renders the main content on the screen.

public

reportError(errmsg: Object): *

Called if the user input username or password is invalid.

public

Send an update to the presenter

public

state: {"username": *, "password": *, "loaderVisible": *}

Private Members
private

Handle the click of the signup button.

private

Handles a Facebook icon click.

private

Handle the Twitter icon click.

private

Renders the social media icons.

Method Summary

Public Methods
public

render()

Extract data from the component's view and send an update to the presenter to do any logic before sending it to the model

Static Public Members

public static navigationOptions: * source

Public Constructors

public constructor(props: Object) source

Create an instance of LoginView

Params:

NameTypeAttributeDescription
props Object

Component properties

Public Members

public LoginP: * source

public componentWillUnmount: * source

Component will unmount after this method is called, do any clean up here Call viewUnmounting in base class so it can do any cleanup for the view before calling the presenter destroy method

public handleLoginIncorrect: * source

Handle an incorrect login by displaying an alert

public navigateToTabs: * source

Navigate to the tabs screen.

public onError(message: string): * source

Alert popup with a message.

public refreshState: * source

Refreshes the state of the component so new data is fetched.

public renderContent: * source

Renders the main content on the screen. Defined in a function because on Android we don't render the KeyboardAvoidingView

public reportError(errmsg: Object): * source

Called if the user input username or password is invalid.

public sendUpdate: * source

Send an update to the presenter

public state: {"username": *, "password": *, "loaderVisible": *} source

Private Members

private _handleClick: * source

Handle the click of the signup button.

private _handleClickF: * source

Handles a Facebook icon click.

private _handleClickT: * source

Handle the Twitter icon click.

private _renderSocialMedia: * source

Renders the social media icons.

Public Methods

public render() source

Extract data from the component's view and send an update to the presenter to do any logic before sending it to the model