File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ As you remember RemoteData is an union of few types: `RemoteInitial`, `RemotePen
11
11
While your data in ** initial** or ** pending** state just use ` initial ` or ` pending ` constant, because you don't have any ** real** values in this case.
12
12
13
13
```
14
- import { initial, pending } from 'remote-data-ts';
14
+ import { initial, pending } from '@devexperts/ remote-data-ts';
15
15
16
16
const customers = initial;
17
17
// or
@@ -20,7 +20,7 @@ const customers = pending;
20
20
21
21
When you receive data from server, use ` failure ` or ` success ` function, it depends on what you received:
22
22
```
23
- import { failure, success } from 'remote-data-ts';
23
+ import { failure, success } from '@devexperts/ remote-data-ts';
24
24
import { apiClient } from 'apiClient';
25
25
import { TCustomer } from './MyModel';
26
26
@@ -48,7 +48,7 @@ type TCustomersList = {
48
48
entities: RemoteData<TCustomer[]>;
49
49
};
50
50
51
- const CustomersList: SFC<TCustomersList> = ({ entities }) => entities.fold (
51
+ const CustomersList: SFC<TCustomersList> = ({ entities }) => entities.foldL (
52
52
() => <NoData />,
53
53
() => <Pending />,
54
54
err => <Failure error={err} />,
You can’t perform that action at this time.
0 commit comments