score:0

export const useAddNewEventsData = (newEvents, onSuccess, onError) => {
console.log('before arrow function: ', newEvents); //got values
return useQuery('add-new-events-query', (newEvents) => AddNewEvents(newEvents), { // here (newEvents) =>
    onSuccess: onSuccess,
    onError: onError,
    enabled: false,
});

Related Query

More Query from same tag