Mattermost-server: Remove deprecated lifecycle methods from post textbox

Created on 24 Sep 2019  路  5Comments  路  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-mobile, these methods should be replaced in the following files:

  • app/components/file_upload_preview/file_upload_item/file_upload_item.js
  • app/components/emoji_picker/emoji_picker_base.js
  • app/components/post_textbox/post_textbox_base.js
  • app/components/file_attachment_list/file_attachment_list.js
  • app/components/post_textbox/components/typing/typing.js

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-18767

AreTechnical Debt Medium Help Wanted PR Exists TecReact Native

Most helpful comment

I'll take this

All 5 comments

I'll try to solve this one. Is it just the post textbox or all files listed?
Also do you prefer the issue to be resolved through the lifecycle methods mentioned in the blogpost or could I use the newer use hooks?

@SamWolfs Were you able to get an answer to this yet on our community server or are you still looking for help? I can ping one of our devs to help if needed.

@amyblais Thanks for the follow-up. I haven't asked about this in the community server yet, I'll do so later today when I find time to continue working on the issue :)

I'll take this

Perfect @nadalfederer issue assigned to you

Was this page helpful?
0 / 5 - 0 ratings