Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Using two the same hooks on the same page ends with render loop #875

Open
wtrocki opened this issue Sep 30, 2020 · 3 comments
Open

Using two the same hooks on the same page ends with render loop #875

wtrocki opened this issue Sep 30, 2020 · 3 comments

Comments

@wtrocki
Copy link
Contributor

wtrocki commented Sep 30, 2020

Bug Report

Steps to reproduce:

  const { error: errorTasks, data,
    subscribeToMore: subscribeToTasks } = useFindTasks(id);
  const { error: errorComments, data: dataComments,
    subscribeToMore: subscribeToComments } = useFindComments({ taskId: id });
  console.log(data);

After having both (even without subscription) page ends refreshing

@wtrocki
Copy link
Contributor Author

wtrocki commented Sep 30, 2020

CC @kingsleyzissou

@wtrocki
Copy link
Contributor Author

wtrocki commented Sep 30, 2020

Actually upon investigation this happens when there is wrong field passed to hook. Error handling does cause the loop.;

@wtrocki
Copy link
Contributor Author

wtrocki commented Sep 30, 2020

Update problem happens when specifying filter (indexedDB)

useFindComments({ taskId: id });

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

No branches or pull requests

1 participant