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 |
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 |
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 |
Redux state properties used in the App component
object
# getRedirect() → {Redirect}
Determines which url to redirect to.
Uses React Router's Redirect component.
A Redirect component
Redirect
# getRoute() → {Route}
Determines which component to route to.
Uses React Router's Route component.
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.
- True is the browser is a mobile browser; false otherwise
boolean