React Loading Animation
A simple loading component to show a colorful animated spinner.
Usage
const Loading = ;
You can either render the component directly (with no props) or render it as a parent
of other components and pass in isLoading
as a prop:
const ListOfThings = { if isFetching && thingssize == 0 return <Loading />; return <ul> ... </ul> ;}
or
const ListOfThings = { return <Loading isLoading=isFetching && thingssize == 0> <ul> ... </ul> </Loading> ;}
Thanks
This component is based on the work at https://codepen.io/jczimm/pen/vEBpoL