Answer the question
In order to leave comments, you need to log in
What data type to register for useCallback in the interface?
There is an interface:
export interface Pug {
isBottom?: boolean
onChangeLimit: any
}
const onChangeLimit = useCallback((page: number) => {
if (faq.isPending) return;
setData(prev => ({
...prev,
currentPage: page,
}));
}, [data]);
const Pagination = (props: Pug) => { ... }
Answer the question
In order to leave comments, you need to log in
On () => void throws an error
useCallback
function with an argument.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question