Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

05.extra-1.js all the cells render when you click one of them #108

Closed
yzaroui opened this issue Feb 18, 2022 · 4 comments
Closed

05.extra-1.js all the cells render when you click one of them #108

yzaroui opened this issue Feb 18, 2022 · 4 comments

Comments

@yzaroui
Copy link

yzaroui commented Feb 18, 2022

Even with splitting the contexts, all the cells still render. This is also visible on the production build on Netlify
https://react-performance.netlify.app/isolated/final/05.extra-1.js

And this is logicial because when you click on a cell the state (context) changes for all the cells.

Is there any other solution to avoid rendering all the cells?

@kentcdodds
Copy link
Member

I'm afraid I don't have time to answer this in the issues, but you're welcome to bring questions like this to my office hours: https://kcd.im/office-hours.

@yzaroui
Copy link
Author

yzaroui commented Feb 18, 2022

I shouldn't have asked the question here because it is not the main subject in this issue, so forget about it 😄

Your solution to this exercise is not accurate and does not work as expected (all the cells render). You my also need to re-record the video for this.

@kentcdodds
Copy link
Member

I'm pretty confident I've looked at this before and you're misunderstanding something. I don't have time to look into it right now but I can during office hours if you wanna ask there.

@fedebabrauskas
Copy link

For anyone that noticed this issue, it will be reviewed in exercise 6.2.

Exercise 5.1 only focuses on the re-rendering of the Grid component, so the Cell components will continue re-rendering as they still consume the state from context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants