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

fix: useless list re-renders #1028

Merged
merged 1 commit into from
May 2, 2019
Merged

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented May 1, 2019

Fixes the useless tons of re-renders on file pages. It happened because every time we returned from selectFiles, we were sorting at the time and using the spread operator, hence creating a new different object, causing a re-render. Now it just changes when the files are fetched and when the sorting is updated.

Also, fixed the issue where you open the Web UI on files page and it just wouldn't load.

License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias hacdias requested review from olizilla and fsdiogo May 1, 2019 20:52
@ghost ghost assigned hacdias May 1, 2019
@ghost ghost added the status/in-progress In progress label May 1, 2019
Copy link
Contributor

@fsdiogo fsdiogo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice @hacdias 👌

Copy link
Member

@olizilla olizilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏅

@olizilla
Copy link
Member

olizilla commented May 2, 2019

Thanks for spotting this and taking the time to fix it. Improvements like this help make the app more robust, which in turn will make people trust it more, and want to use it.

I wonder how we might create tests for this kind of thing issue...

@olizilla olizilla merged commit 119d388 into master May 2, 2019
@ghost ghost removed the status/in-progress In progress label May 2, 2019
@olizilla olizilla deleted the fix/stop-tons-of-renderings! branch May 2, 2019 09:48
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

Successfully merging this pull request may close these issues.

3 participants