Skip to content

Commit

Permalink
doc: fix useRequest doc error
Browse files Browse the repository at this point in the history
  • Loading branch information
brickspert committed Feb 9, 2020
1 parent 796604a commit 1817ecf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/use-request/demo/loadMore-1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default () => {
};

const LoadMoreComponent = () => {
const { data, loading, loadMore, loadingMore } = useLoadMore((d: Result | undefined) => getLoadMoreList(d?.nextId, 3), {
const { data, loading, loadMore, loadingMore } = useRequest((d: Result | undefined) => getLoadMoreList(d?.nextId, 3), {
loadMore: true,
cacheKey: 'loadMoreDemoCacheId',
fetchKey: d => `${d?.nextId}-`,
Expand Down
2 changes: 1 addition & 1 deletion packages/use-request/demo/loadMore-2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const asyncFn = ({ pageSize, offset }: any): Promise<Result> =>

export default () => {
const containerRef = useRef<HTMLDivElement>(null);
const { data, loading, loadingMore, reload, loadMore, noMore } = useLoadMore((d: Result | undefined) => asyncFn({
const { data, loading, loadingMore, reload, loadMore, noMore } = useRequest((d: Result | undefined) => asyncFn({
offset: d?.list?.length || 0,
pageSize: 3,
}), {
Expand Down

0 comments on commit 1817ecf

Please sign in to comment.