Hey @link2twenty
, a follow-up question, if we do go ahead with the first approach that you just showed, won't it have a performance impact? Consider the following:
Funnily enough, I was actually looking into this last night. I'd read a few places that several sets together sort of roll into one to save rendering lots. So I've made this quick proof of concept.
The number will go up each time we run render (based on either of those states changing).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey @link2twenty , a follow-up question, if we do go ahead with the first approach that you just showed, won't it have a performance impact? Consider the following:
Now if we get a fresh quote in
useEffect(...)and I update both quote and author on success, won't it cause 2 re-renders due to 2 set states?Funnily enough, I was actually looking into this last night. I'd read a few places that several sets together sort of roll into one to save rendering lots. So I've made this quick proof of concept.
The number will go up each time we run render (based on either of those states changing).