<Async>
and you can use the same component several times.<IfInitial>
/ <Async.Initial>
children
function(state: Object): Node | Node
Render function or React Node.state
object
Async state object (return value of useAsync()
).persist
boolean
Show until we have data, even while loading or when an error occurred. By default it hides as soon<IfPending>
/ <Async.Pending>
<Async.Loading>
children
function(state: Object): Node | Node
Render function or React Node.state
object
Async state object (return value of useAsync()
).initial
boolean
Show only on initial load (when data
is undefined
).<IfFulfilled>
/ <Async.Fulfilled>
undefined
).<Async.Resolved>
children
function(data: any, state: Object): Node | Node
Render function or React Node.state
object
Async state object (return value of useAsync()
).persist
boolean
Show old data while loading new data. By default it hides as soon as a new promise starts.<IfRejected>
/ <Async.Rejected>
children
function(error: Error, state: Object): Node | Node
Render function or React Node.state
object
Async state object (return value of useAsync()
).persist
boolean
Show old error while loading new data. By default it hides as soon as a new promise starts.