Components

App

<App isStartupDone isAuthenticated isAuthFlowComplete shouldShowWelcomePage setBrowserType />

Renders the top level of the React app. Sets up React Router.

Constructor

# <App isStartupDone isAuthenticated isAuthFlowComplete shouldShowWelcomePage setBrowserType />

PropTypes:
Name Type Required Description Default
isStartupDone bool Yes Indicates whether app startup is done
isAuthenticated bool No Indicates whether there exists an authenticated user
isAuthFlowComplete bool No Indicates whether the authentication flow is complete (Sign in, sign up, or auth check)
shouldShowWelcomePage bool Yes Indicates whether this component should display the Welcome component
setBrowserType func Yes Sets the browser type (mobile or desktop) in Redux
Author:

View Source App/App.js, line 28

Extends

  • Component

Methods

# static mapDispatchToProps(dispatch) → {object}

Passes certain Redux actions to the App component as props. This function is used only by the react-redux connect function.
Parameters:
Name Type Description
dispatch function The react-redux dispatch function

View Source App/App.js, line 190

Redux actions used in the App component
object

# static mapStateToProps(state) → {object}

Gets the current state from Redux and passes parts of it to the App component as props. This function is used only by the react-redux connect function.
Parameters:
Name Type Description
state object The Redux state

View Source App/App.js, line 174

Redux state properties used in the App component
object

# componentDidMount()

Sets the browser type (mobile or not mobile)

View Source App/App.js, line 32

# getRedirect() → {Redirect}

Determines which url to redirect to. Uses React Router's Redirect component.

View Source App/App.js, line 68

A Redirect component
Redirect

# getRoute() → {Route}

Determines which component to route to. Uses React Router's Route component.

View Source App/App.js, line 89

A Route component
Route

# isMobileBrowser() → {boolean}

Determines if the browser is mobile or not. Mobile device check includes: iPhone, iPod, iPad (pre-iPad OS), Android, WebOS (Palm phone), BlackBerry, and Windows Phone.

View Source App/App.js, line 49

- True is the browser is a mobile browser; false otherwise
boolean

# render()

Renders the App component

View Source App/App.js, line 124

The JSX to render