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

Avoid re-rendering RoomList on room switch #5015

Merged
merged 3 commits into from Sep 11, 2017

Conversation

@dbkr
Copy link
Member

dbkr commented Sep 11, 2017

See matrix-org/matrix-react-sdk#1375

},
shouldComponentUpdate: function(nextProps, nextState) {
// MatrixChat will update whenever the user switches
// rooms, but propagating this chnage all the way down

This comment has been minimized.

Copy link
@ara4n

ara4n Sep 11, 2017

Member

change

// here. The RoomTiles listen for the room change
// events themselves to know when to update.
// We just need to update if any of these things change.
if (

This comment has been minimized.

Copy link
@ara4n

ara4n Sep 11, 2017

Member

might want an XXX to spell out that if we add new props, we have to update the shouldComponentUpdate (either here or in the props definition)

@ara4n

This comment has been minimized.

Copy link
Member

ara4n commented Sep 11, 2017

lgtm, modulo minor niggles

dbkr added 2 commits Sep 11, 2017
if adding new props
@dbkr dbkr merged commit f18f136 into develop Sep 11, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.