EmptyView
Emptyview gives you a nice way to handle the empty state of your screen,like showing some api failure message or some illustration to illustrate user that there is not data on the screen.
Usage
Props
title
The heading that will be shown on top of your error screen,it will be a string which renders under Text
View so you can pass custom styles titleStyle.
Type | Default | Required |
---|---|---|
string | none | No |
titleStyle
custom Text
Style object to style the title of your error message.
Type | Default | Required |
---|---|---|
TextStyle | none | No |
subTitle
The subheading that will be shown below the title of the error screen,like title it is also a string which renders under Text
View,whose styles you can control with subTitleStyle
Type | Default | Required |
---|---|---|
string | none | No |
subTitleStyle
custom Text
Style object to style the subtitle of your error message.
Type | Default | Required |
---|---|---|
TextStyle | none | No |
actionTitle
action
will let you to place a button in error screen so that user can perform any action,if some error occured or there is no data. so actionTitle
will be the label of Button.
Type | Default | Required |
---|---|---|
string | none | No |
actionType
using this props you can control the type of button to be used in the action part of the empty view,the values will be the same as type props of Button
Component
actionPress
it is a function to be called when user will press the button,it is similar as onPress props of Button
Component