diff --git a/app/components/channel_drawer_list/unread_indicator.js b/app/components/channel_drawer_list/unread_indicator.js index 7810d5890..0fd1147b3 100644 --- a/app/components/channel_drawer_list/unread_indicator.js +++ b/app/components/channel_drawer_list/unread_indicator.js @@ -1,8 +1,7 @@ // Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import React from 'react'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import React, {PropTypes, PureComponent} from 'react'; import {StyleSheet, Text, View} from 'react-native'; const Styles = StyleSheet.create({ @@ -17,19 +16,13 @@ const Styles = StyleSheet.create({ } }); -export default class UnreadIndicator extends React.Component { +export default class UnreadIndicator extends PureComponent { static propTypes = { style: View.propTypes.style, textStyle: Text.propTypes.style, - text: React.PropTypes.node.isRequired + text: PropTypes.node.isRequired }; - constructor(props) { - super(props); - - this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this); - } - render() { return ( { it('async/await', async () => { await Promise.resolve(true); }); - - it('fetch', (done) => { - fetch('http://example.com').then(() => { - done(); - }).catch(() => { - // No internet connection, but fetch still returned at least - done(); - }); - }); });