diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-04-22 03:05:35 +0900 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-21 20:05:35 +0200 |
commit | 1948f9e767c5c8f7cb52337ce777a61b5ad1a599 (patch) | |
tree | 4d5f3549f6e5fd88340bb3543e1eb2eafc47952c /app/assets/javascripts/components/components/attachment_list.jsx | |
parent | 27ea2a88c12835b491ea5537f934983470faf781 (diff) |
Remove deprecated features at React v15.5 (#1905)
* Remove deprecated features at React v15.5 - [x] React.PropTypes - [x] react-addons-pure-render-mixin - [x] react-addons-test-utils * Uncommented out & Add browserify_rails options * re-add react-addons-shallow * Fix syntax error from resolve conflicts * follow up 59a77923b368d48c590cd9f4a0c6b73ce972d33f
Diffstat (limited to 'app/assets/javascripts/components/components/attachment_list.jsx')
-rw-r--r-- | app/assets/javascripts/components/components/attachment_list.jsx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/assets/javascripts/components/components/attachment_list.jsx b/app/assets/javascripts/components/components/attachment_list.jsx index 56238fe19..54841fa51 100644 --- a/app/assets/javascripts/components/components/attachment_list.jsx +++ b/app/assets/javascripts/components/components/attachment_list.jsx @@ -1,14 +1,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; -const AttachmentList = React.createClass({ - propTypes: { - media: ImmutablePropTypes.list.isRequired - }, - - mixins: [PureRenderMixin], +class AttachmentList extends React.PureComponent { render () { const { media } = this.props; @@ -29,6 +23,10 @@ const AttachmentList = React.createClass({ </div> ); } -}); +} + +AttachmentList.propTypes = { + media: ImmutablePropTypes.list.isRequired +}; export default AttachmentList; |