Version: 1.2.0
Component States
Each component manages its own state, for basic use cases as below:
- Loading: Triggers when fetching and waiting for data
- Blank: Triggers when no data is available
- Error: When there is some error
By default, states are being handled using pre-designed components in the library. However, you can easily override the states of any component by passing componentStates
prop
to the respective component
.
Here is the data format or type of the component states:
Usage
You can pass any valid JSX
for each state property, which can be JSX/React Component. For instance:
CustomType
ComponentStates
Props Passed to Error Component
refetch: () => void
is a function which can be called to refetch the datamessage
prop so that user can render an error message as required