Replies: 2 comments
-
|
An extra render call when an async call is added is expected. Adding the Note that your |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot Douglas, your comment really helped as always :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I have noticed to something strange, when async selector fires an API call the components that uses the selector render 3 times,
and if the selector doesn't perform an API call but rather returns some calculated value the component renders twice.
My question is why when there us an API call on the selector there is extra render, is that normal behavior?
I've reproduce the issue so you can test that, in my example
compBis the component that read the data from the selector andFilterscomponent change thefilterAtomthat cause to the selector to run.Notice my comments in
Filter.jsfile it will illustrate what I described.https://codesandbox.io/s/currying-flower-xqvjv3?file=/src/Filter.js
Thanks for the help :)
Beta Was this translation helpful? Give feedback.
All reactions