0
0
Fork 0

Use Class and Property Decorators (#3730)

ref https://tc39.github.io/proposal-decorators/
This commit is contained in:
Yamagishi Kazutoshi 2017-06-24 02:36:54 +09:00 committed by Eugen Rochko
parent 0c44316b22
commit c1a8e3d1eb
90 changed files with 168 additions and 274 deletions

View file

@ -26,7 +26,11 @@ const store = configureStore();
const initialState = JSON.parse(document.getElementById('initial-state').textContent);
store.dispatch(hydrateStore(initialState));
class Mastodon extends React.PureComponent {
export default class Mastodon extends React.PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,
};
componentDidMount() {
const { locale } = this.props;
@ -117,9 +121,3 @@ class Mastodon extends React.PureComponent {
}
}
Mastodon.propTypes = {
locale: PropTypes.string.isRequired,
};
export default Mastodon;