-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix liking a publication re-renders entire feed #4188
Comments
would like to work on this issue /attempt #4188 Options |
/attempt #4188 Options |
Note The user @RutamBhagat is already attempting to complete issue #4188 and claim the bounty. We recommend checking in on @RutamBhagat's progress, and potentially collaborating, before starting a new solution. |
@bigint Is there a way to test the liking without a lens profile? |
@RutamBhagat Try with testnet, change your env to testnet then create an account (click login -> create new account) |
@bigint I tried this on my device but wasn't able to reproduce the bug. |
@rajdip-b you not seeing rerenders? can you make a short video and share 🙇🏼 ? |
the rerenders are visible for me |
That's odd. I'm using firefox. Perhaps you can tell me where I should focus on? I was looking at the DOM tree from the inspect tab. |
You should use react chrome extension and enable rerender paints! |
Ahh, okay looks like I need to switch to chrome for dev 🥲. |
@rajdip-b search react dev tools addon |
@rajdip-b you can work on this, I am cancelling my attempt |
@RutamBhagat sure! can you give me some insights about anything that you might have came across that is making this issue? |
@bigint is this bug localized to the "Home" section alone? or is it happening in explore aswell? |
it happens on all feed @rajdip-b 🙇🏼 |
hmmmm....lemme get to it then |
@bigint can you assign me this one please? |
@bigint hey, i seem to have fixed the issue. alternatively, my understanding is, the application is listening to cache updates. and so, updating the cache makes the entire thing re-render. |
@rajdip-b the cache is intended to update values across components Here is the example, both are different comp but we update it 😉 Screen.Recording.2023-12-12.at.7.02.57.PM.mov |
checked this component aswell, the entire component is re-rendering. is this expected?
|
It is expected to rerender only the count but not the complete publication 🙇🏼 |
got it |
Hey @bigint, I don't know if I am seeing this correct, but I really feel that there is no re-rendering going on. I added a console log to the publication component that will execute every single time the component was rendered. And as I expected, only those components were re-rendered where I was liking/unliking. Check the logs section, might give you the idea about what I am saying. Another point being, re-renders occur when we have duplicate/no keys of list items. But that's not the case in here: |
Interesing, lemme try it |
/attempt #4188 Options |
It looks like no one is working on this issue. can I work on this? |
Screen.Recording.2023-12-12.at.12.33.56.PM.mov
The text was updated successfully, but these errors were encountered: