Definitely some misleading things in this piece:
There's a difference between memo and useMemo, they are totally different (although they do complement each other), you should also be careful not to just memo everything as this can often be more expensive than just recalculating. There are plenty of articles and metrics on this topic.
Calling setState async is misleading. Yes it batches your state updates until the end of the render cycle, but it's not async in the classic sense. Async is associated with promises and delayed callbacks.
Don't take this as criticism of your writing, sharing and creating content is great, I just want to clear up some (pretty common) misconceptions
Thank you jack for your explanation it is pretty good ! π
Although my point of mentioning the memoization is closely related to how we can 'cache' the dumb components and avoid them from re-rendering. Although, after reading your point, I will definitely take deeper look into this.
I am calling setState() as async in the sense of it's execution, as compared to other sync code like classical for -- of loop.
Although, I want to thank to you for this. I will take it as a helpful note and I will definitely improve myself in my next oneπ
Make sure you criticize that also π π
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.
Definitely some misleading things in this piece:
There's a difference between memo and useMemo, they are totally different (although they do complement each other), you should also be careful not to just memo everything as this can often be more expensive than just recalculating. There are plenty of articles and metrics on this topic.
Calling setState async is misleading. Yes it batches your state updates until the end of the render cycle, but it's not async in the classic sense. Async is associated with promises and delayed callbacks.
Don't take this as criticism of your writing, sharing and creating content is great, I just want to clear up some (pretty common) misconceptions
Thank you jack for your explanation it is pretty good ! π
Although my point of mentioning the memoization is closely related to how we can 'cache' the dumb components and avoid them from re-rendering. Although, after reading your point, I will definitely take deeper look into this.
I am calling setState() as async in the sense of it's execution, as compared to other sync code like classical for -- of loop.
Although, I want to thank to you for this. I will take it as a helpful note and I will definitely improve myself in my next oneπ
Make sure you criticize that also π π