Constructor
# <UserWidget name profilePictureUrl />
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
name |
string | Yes | The user's name | |
profilePictureUrl |
string | No | The user's profile picture url |
Extends
- Component
Members
# state
UserWidget component state
Properties:
Name | Type | Description |
---|---|---|
isProfilePictureError |
boolean | Indicates if there was an error displaying the user's profile picture |
Methods
# static mapStateToProps(state) → {object}
Gets the current state from Redux and passes parts of it to the UserWidget 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 UserWidget component
object
# profilePictureErrorHandler()
Updates state indicating that there was a profile picture error
# render()
Renders the UserWidget component