Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

s/DidMount/WillMount/ in MessageComposerInput #2151

Merged
merged 1 commit into from
Sep 6, 2018
Merged

s/DidMount/WillMount/ in MessageComposerInput #2151

merged 1 commit into from
Sep 6, 2018

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Sep 6, 2018

This fixes the tests that broke with matrix-org/matrix-js-sdk#717

This is because of https://github.com/vector-im/riot-web/blob/master/test/app-tests/joining.js#L63
which prevents the DOM nodes from actually ending up in the DOM, even though the react components
get rendered. This means that WillMount and WillUnmount are called, but not DidMount.

Using WillMount is more symmertrical anyway since the resulting teardown code must be in
WillUnmount (since there is no DidUnmount).

This fixes the tests that broke with matrix-org/matrix-js-sdk#717

This is because of https://github.com/vector-im/riot-web/blob/master/test/app-tests/joining.js#L63
which prevents the DOM nodes from actually ending up in the DOM, even though the react components
get rendered. This means that WillMount and WillUnmount are called, but not DidMount.

Using WillMount is more symmertrical anyway since the resulting teardown code must be in
WillUnmount (since there is no DidUnmount).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants