Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onAnyMessage callback called more than once for paginated hooks #60

Open
everdimension opened this issue May 16, 2024 · 0 comments
Open

Comments

@everdimension
Copy link
Member

Code example:

  const entry = useAddressActions(
    {
      ...params,
      currency: 'usd',
      actions_search_query: searchQuery,
    },
    {
      limit: 30,
      listenForUpdates: true,
      paginatedCacheMode: 'first-page',
      onAnyMessage: useCallback((a, b, c) => {
        console.log('onAnyMessage', { a, b, c }); // this is called more than once for each item
      }, []),
    }
  );

It's called twice for each item for first "page" and then increases for each next page load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant