Switch to pure components, closes #36
This commit is contained in:
parent
609f370de0
commit
6c24bf4e60
@ -8,7 +8,7 @@ export const AlertPropType = PropTypes.shape({
|
|||||||
message: PropTypes.string.isRequired
|
message: PropTypes.string.isRequired
|
||||||
})
|
})
|
||||||
|
|
||||||
export class Alert extends React.Component {
|
export class Alert extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
alert: AlertPropType,
|
alert: AlertPropType,
|
||||||
dismiss: PropTypes.func.isRequired
|
dismiss: PropTypes.func.isRequired
|
||||||
@ -34,7 +34,7 @@ export class Alert extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Alerts extends React.Component {
|
export default class Alerts extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
alerts: PropTypes.arrayOf(AlertPropType).isRequired,
|
alerts: PropTypes.arrayOf(AlertPropType).isRequired,
|
||||||
dismiss: PropTypes.func.isRequired
|
dismiss: PropTypes.func.isRequired
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import React from 'react'
|
|||||||
import Video from './Video.js'
|
import Video from './Video.js'
|
||||||
import _ from 'underscore'
|
import _ from 'underscore'
|
||||||
|
|
||||||
export default class App extends React.Component {
|
export default class App extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
active: PropTypes.string,
|
active: PropTypes.string,
|
||||||
alerts: PropTypes.arrayOf(AlertPropType).isRequired,
|
alerts: PropTypes.arrayOf(AlertPropType).isRequired,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
export default class Input extends React.Component {
|
export default class Input extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
notify: PropTypes.func.isRequired,
|
notify: PropTypes.func.isRequired,
|
||||||
sendMessage: PropTypes.func.isRequired
|
sendMessage: PropTypes.func.isRequired
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export const NotificationPropTypes = PropTypes.shape({
|
|||||||
message: PropTypes.string.isRequired
|
message: PropTypes.string.isRequired
|
||||||
})
|
})
|
||||||
|
|
||||||
export default class Notifications extends React.Component {
|
export default class Notifications extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
notifications: PropTypes.objectOf(NotificationPropTypes).isRequired,
|
notifications: PropTypes.objectOf(NotificationPropTypes).isRequired,
|
||||||
max: PropTypes.number.isRequired
|
max: PropTypes.number.isRequired
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import React from 'react'
|
|||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import { ME } from '../constants.js'
|
import { ME } from '../constants.js'
|
||||||
|
|
||||||
export default class Video extends React.Component {
|
export default class Video extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onClick: PropTypes.func,
|
onClick: PropTypes.func,
|
||||||
active: PropTypes.bool.isRequired,
|
active: PropTypes.bool.isRequired,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user