Use React.PureComponent instead of pure-render-decorator

This commit is contained in:
Ken-Håvard Lieng 2017-02-17 01:46:39 +01:00
parent 531792b14a
commit e6892ccd2d
19 changed files with 57 additions and 139 deletions

View file

@ -1,9 +1,7 @@
import React, { Component } from 'react';
import pure from 'pure-render-decorator';
import React, { PureComponent } from 'react';
import SearchResult from './SearchResult';
@pure
export default class Search extends Component {
export default class Search extends PureComponent {
componentDidUpdate(prevProps) {
if (!prevProps.search.show && this.props.search.show) {
this.input.focus();