Skip to content

Commit

Permalink
fix(demo): useMemo should be useCallback in mock data demo
Browse files Browse the repository at this point in the history
  • Loading branch information
unleashit committed Jan 1, 2024
1 parent 07d27c0 commit 323c996
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demos/frontend/src/components/mockData/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { AppContext } from '../../utils/context';
export function PaginationDemo() {
const { store } = React.useContext(AppContext);

const request1 = React.useMemo(
const request1 = React.useCallback(
() => store.generateFakeUsers({ total: 3 }),
[store],
);
const request2 = React.useMemo(
const request2 = React.useCallback(
() => store.generateFakeProducts({ total: 3 }),
[store],
);
const request3 = React.useMemo(
const request3 = React.useCallback(
() => store.generateComplexJson({ total: 3 }),
[store],
);
Expand Down

0 comments on commit 323c996

Please sign in to comment.