Mattermost-server: Remove deprecated lifecycle methods from file attachment previews

Created on 24 Sep 2019  Â·  9Comments  Â·  Source: mattermost/mattermost-server

The following React lifecycle methods have been deprecated by React and will start to be removed starting in React 17:

  • componentWillMount
  • componentWillReceiveProps
  • componentWillUpdate

The React team has published a guide discussing the changes and how to migrate to the new lifecycle methods here: https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

As part of a campaign to remove these methods from https://github.com/mattermost/mattermost-webapp, these methods should be replaced in the following files:

  • components/pdf_preview.jsx
  • components/code_preview.jsx
  • components/view_image/view_image.jsx

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-18788

AreTechnical Debt Easy Help Wanted PR Exists TecReactJS

Most helpful comment

@CEOehis Go for it! Thank you @CEOehis, let us know if you have any questions during the development :)

All 9 comments

@mattermod @hmhealey Can I pick this one to try and update the deprecated lifecycle methods?

@aparnaadesai Yep, feel free to. Let me know if you run into any issues or have any questions

@aparnaadesai Did you got the time to work on this?

Opening up for grabs given no recent activity

can i work on this issue?

Go for it, thank you @sridhar02!

I'm making this available for the pubic again. Let me know if you still want to work on this @sridhar02

@hanzei seems like it's taking forever for someone to complete this. I would like to work on this. I already have my dev environment set up. Can I go ahead?

@CEOehis Go for it! Thank you @CEOehis, let us know if you have any questions during the development :)

Was this page helpful?
0 / 5 - 0 ratings