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 enabling/disabling collapsed toots, as well as the unfold thread feature #447

Conversation

ClearlyClaire
Copy link

Both the unfold thread feature (issue #446) and the enabling/disabling of collapsed toots are currently broken because the Status component is using both deprecated (componentWillReceiveProps) and newly-introduced (getSnapshotBeforeUpdate, since React 16.3) lifecycle methods. While this is poorly documented, this results in the deprecated methods being ignored.

This pull requests ports the functionality of the deprecated method componentWillReceiveProps using the newly-introduced getDerivedStateFromProps.

An update of some dependencies was required for the aforementioned method to work properly (see reduxjs/react-redux#879 and reduxjs/react-redux#915).

…eceiveProps

As we are already using the new getSnapshotBeforeUpdate lifecycle method,
we apparently cannot use the deprecated ones at all in this component.
@ClearlyClaire ClearlyClaire force-pushed the glitch-soc/features/unfold-thread branch from 2ab7536 to 0ce0665 Compare April 26, 2018 23:25
@beatrix-bitrot beatrix-bitrot merged commit 8de8a62 into glitch-soc:master Apr 27, 2018
@ClearlyClaire ClearlyClaire deleted the glitch-soc/features/unfold-thread branch May 16, 2018 20:09
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.

2 participants