Mattermost-server: Remove deprecated lifecycle methods from post components

Created on 24 Sep 2019  路  2Comments  路  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/edit_post_modal/edit_post_modal.jsx
  • components/youtube_video/youtube_video.jsx
  • components/at_mention/at_mention.jsx
  • components/file_attachment/file_attachment.jsx
  • components/post_view/post_body/post_body.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-18773

AreTechnical Debt Medium Hacktoberfest Help Wanted PR Exists TecReactJS

All 2 comments

@hmhealey I want to try this one...

Sounds good. Let me know if you need any help with it

Was this page helpful?
0 / 5 - 0 ratings