Skip to content

Commit

Permalink
Merge pull request #31 from Boffee/boffee/fix-infinite-rerender
Browse files Browse the repository at this point in the history
fix: hooks cause infinite rerender
  • Loading branch information
maradotwebp authored Oct 21, 2023
2 parents de3bd8e + 821a44b commit 665d592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/retrieval/useMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function useMany<T extends Entity<T>, P extends PrimaryKeyOf<T>>(
dispose = await run();
});
return dispose;
}, [table, query]);
}, [table, JSON.stringify(query)]);

return {
data: state,
Expand Down

0 comments on commit 665d592

Please sign in to comment.