This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 386
Duplicate requests are sent when use transformItems #1037
Comments
Hi @phidang0810, thanks for reporting the issue. It's a known problem on our side, we trigger a new request when the props aren't shallow equal. In your example there is a new function create on every render. It means that the props of the widget aren't shallow equal on every render. You can avoid this issue by passing always the same reference to the |
Could you give me a example for this? |
Yes sure, I wasn't able to give you an example since I had some trouble with CodeSandbox. But now it's good, you can find your example updated on CodeSandbox. Let me know how it goes 😉 |
Great. Thank you :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi guy, I want report a bug. I'm using react-router v4, when I add widget RefinementList with transformItems property to sort items, duplicate request are send to algolia. More detail, you can see https://codesandbox.io/s/43k243yqlx
The text was updated successfully, but these errors were encountered: