Skip to content

Commit 78b6129

Browse files
committed
Update samples with github src paths
1 parent 0869de8 commit 78b6129

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

readme.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22

33
# react-promise-tracker
44

5-
Simple promise tracker React Hoc. You can see it in action in this [Live Demo](https://codesandbox.io/s/wy04jpmly7), and find the basic info to get started in this [post](https://www.basefactor.com/react-how-to-display-a-loading-indicator-on-fetch-calls).
5+
Simple promise tracker React Hoc. You can see it in action in this [Live Demo](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/00-example-basic), and find the basic info to get started in this [post](https://www.basefactor.com/react-how-to-display-a-loading-indicator-on-fetch-calls).
66

77
For detailed information check out the [project site](https://lemoncode.github.io/react-promise-tracker/)
88

99
# Why do I need this?
1010

1111
Sometimes we need to track blocking promises (e.g. fetch or axios http calls), and control whether to
1212
display a loading spinner indicator not, you have to take care of scenarios like:
13-
- You could need to track several ajax calls being performed in parallel.
14-
- Some of them you want to be tracked some others to be executed silently in background.
15-
- You may want to have several spinners blocking only certain areas of the screen.
16-
- For high speed connection you may wat to show the loading spinner after an small delay of time
13+
14+
- You could need to track several ajax calls being performed in parallel.
15+
- Some of them you want to be tracked some others to be executed silently in background.
16+
- You may want to have several spinners blocking only certain areas of the screen.
17+
- For high speed connection you may wat to show the loading spinner after an small delay of time
1718
to avoid having a flickering effect in your screen.
1819

1920
This library implements:
20-
- A simple function that will allow a promise to be tracked.
21-
- A Hook + HOC component that will allow us wrap a loading spinner (it will be displayed when the number of tracked request are greater than zero, and hidden when not).
21+
22+
- A simple function that will allow a promise to be tracked.
23+
- A Hook + HOC component that will allow us wrap a loading spinner (it will be displayed when the number of tracked request are greater than zero, and hidden when not).
2224

2325
# Installation
2426

@@ -70,8 +72,7 @@ export const LoadingSpinerComponent = (props) => {
7072
- [Demo page](http://www.davidhu.io/react-spinners/)
7173
- [Github page](https://github.com/davidhu2000/react-spinners)
7274

73-
74-
- Then in your application entry point (main / app / ...) just add this loading spinner to be displayed:
75+
* Then in your application entry point (main / app / ...) just add this loading spinner to be displayed:
7576

7677
```diff
7778
import React from 'react';
@@ -162,21 +163,21 @@ export const Spinner = (props) => {
162163

163164
Full examples:
164165

165-
- [00 Basic Example](https://codesandbox.io/s/wy04jpmly7): minimum sample to get started.
166+
- [00 Basic Example](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/00-example-basic): minimum sample to get started.
166167

167-
- [01 Example Areas](https://codesandbox.io/s/wy04jpmly7): defining more than one spinner to be displayed in separate screen areas.
168+
- [01 Example Areas](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/01-example-areas): defining more than one spinner to be displayed in separate screen areas.
168169

169-
- [02 Example Delay](https://codesandbox.io/s/kwrrjjyjm5): displaying the spinner after some miliseconds delay (useful when your users havbe high speed connections).
170+
- [02 Example Delay](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/02-example-delay): displaying the spinner after some miliseconds delay (useful when your users havbe high speed connections).
170171

171-
- [03 Example Hoc](https://codesandbox.io/s/j2jjrk4ply): using legacy high order component approach (useful if your spinner is a class based component)
172+
- [03 Example Hoc](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/03-example-hoc): using legacy high order component approach (useful if your spinner is a class based component)
172173

173-
- [04 Initial load](https://codesandbox.io/s/j2jjrk4ply): launching ajax request just on application startup before the spinner is being mounted.
174+
- [04 Initial load](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/04-initial-load): launching ajax request just on application startup before the spinner is being mounted.
174175

175-
- [05 Typescript](https://codesandbox.io/s/5ww39l90yp): full sample using typescript (using library embedded typings).
176+
- [05 Typescript](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/05-typescript): full sample using typescript (using library embedded typings).
176177

177-
- [06 Suspense Like](https://codesandbox.io/s/6w1oly0x9r): sample implementing a suspense-like component (typescript).
178+
- [06 Suspense Like](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/06-suspense-like): sample implementing a suspense-like component (typescript).
178179

179-
- [07 Suspense Custom](https://codesandbox.io/s/jjkm4vvqr5): sample implementing a suspense-like component that can be customized by passing a spinner component of your choice (typescript).
180+
- [07 Suspense Custom](https://codesandbox.io/s/github/lemoncode/react-promise-tracker/tree/master/examples/07-suspense-custom): sample implementing a suspense-like component that can be customized by passing a spinner component of your choice (typescript).
180181

181182
# About Basefactor + Lemoncode
182183

0 commit comments

Comments
 (0)