commit: 13cf92df271e4459ca9122ec7496fa8208864727
parent: 61e62757816cd8cfe38944d509f8ec13d7d86912
Author: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Date: Tue, 6 Mar 2018 15:28:26 +0900
Use React.PureComponent instead of React.Component (#6653)
Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/javascript/mastodon/features/notifications/components/clear_column_button.js b/app/javascript/mastodon/features/notifications/components/clear_column_button.js
@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
-export default class ClearColumnButton extends React.Component {
+export default class ClearColumnButton extends React.PureComponent {
static propTypes = {
onClick: PropTypes.func.isRequired,
diff --git a/app/javascript/mastodon/features/ui/components/bundle.js b/app/javascript/mastodon/features/ui/components/bundle.js
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
const emptyComponent = () => null;
const noop = () => { };
-class Bundle extends React.Component {
+class Bundle extends React.PureComponent {
static propTypes = {
fetchComponent: PropTypes.func.isRequired,
diff --git a/app/javascript/mastodon/features/ui/components/bundle_column_error.js b/app/javascript/mastodon/features/ui/components/bundle_column_error.js
@@ -13,7 +13,7 @@ const messages = defineMessages({
retry: { id: 'bundle_column_error.retry', defaultMessage: 'Try again' },
});
-class BundleColumnError extends React.Component {
+class BundleColumnError extends React.PureComponent {
static propTypes = {
onRetry: PropTypes.func.isRequired,
diff --git a/app/javascript/mastodon/features/ui/components/bundle_modal_error.js b/app/javascript/mastodon/features/ui/components/bundle_modal_error.js
@@ -10,7 +10,7 @@ const messages = defineMessages({
close: { id: 'bundle_modal_error.close', defaultMessage: 'Close' },
});
-class BundleModalError extends React.Component {
+class BundleModalError extends React.PureComponent {
static propTypes = {
onRetry: PropTypes.func.isRequired,