Swr: Performance: Component Re-rendered because of hook changes.

Created on 7 Dec 2019  路  2Comments  路  Source: vercel/swr

Make sure the state returned from the reducer is not a different object that equals by value but different by reference from the previous state:

image

feature request

Most helpful comment

Will work on an improvement soon.

All 2 comments

I think it鈥檚 because of the change of isValidating (the loading state), which is also returned by the hook.

Will work on an improvement soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DoT214 picture DoT214  路  4Comments

oran1248 picture oran1248  路  3Comments

alexanderbluhm picture alexanderbluhm  路  3Comments

nainardev picture nainardev  路  4Comments

tiagocorreiaalmeida picture tiagocorreiaalmeida  路  3Comments