Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #21022] Improve performance by reducing re-renders SidebarLinks #21406
[Fix #21022] Improve performance by reducing re-renders SidebarLinks #21406
Changes from 7 commits
82974c6
eada423
c31f7de
32c2b70
6a38ee8
a651118
c8ea565
99c8a1d
27f8eb0
f3a39b6
99d2d40
4bb3a19
8bfad23
0bdd608
4d9bb25
640753c
a84e26f
b7cb24d
cdb46d6
69e46ae
4128c82
8a1a5c2
f0d54a7
7c5521a
8e4f2c2
657fad8
bd086ab
6c296ad
8625724
db85064
0afc57e
1a88a51
b9c6c0f
f6d7bd0
3b5bd35
4a8f494
c53cf6d
00a4b5c
26e661a
448878d
7bc90eb
336d5fd
8180e87
5c35629
a73fa9c
c4fed2b
2a73540
de7209f
de5fe1d
ecf4c0a
b76a569
c0fba28
31a1167
f2f3c9d
0bb1e62
36c8913
478288d
3d60095
9f88371
e25fd20
17ed2a1
9ba0811
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we don't use
withOnyx
? this looks like an anti-pattern.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the performance improvements. The modal state is needed for a logic, that has nothing to do with the render/UI output. Thus, the component shouldn't re-render (because it's a really expensive to render one) just because we open a modal.
Long term I want to remove the modal state from onyx and move it e.g. to a react context, as I think it doesn't belong in the onyx store.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the react context approach.