Examples
You can try to a sample of react-promise-tracker live:
Examples available:
Basic example: loading data form a remote api, feeding them in a table and displaying an spinner meanwhile request is being processed.
Using areas: Showing loading indicators based on ui areas (you can just trackpromises to be displayed on only certain areas of the screen).
Using delay: Show ajax indicator not immediately but after a delay (useful for fast internet connections).
HOC sample: How to consume high order component implementation of react promise tracker.
HOC sample areas: HOC + areas
- Code Sandbox: https://codesandbox.io/s/01-example-areas-hoc-ji3fh
Initial load: Just firing AJAX request on application initial load.
Typescript: Using react-promise-tracker on a typescript project (including typings).
Suspense like: Sample implementing a suspense-like component (typescript).
Suspense custom: sample implementing a suspense-like component that can be customized by passing a spinner component of your choice (typescript).