title: Uncaught TypeError: Cannot read property 'filter' of undefined
body: <pre><code>import React, {PureComponent} from 'react';
  import {TextInput} from '../../shared';
  import {array} from 'prop-types';
  import { EmployeeTable } from '../employeeTable/EmployeeTable';
  import './HeaderSearch.scss';
  
  export class HeaderSearch extends PureComponent {
      static propTypes = {
          employees: array
      }
  
      constructor (props) {
          super(props);
  
          this.state = {
              searchValue: null
          };
      }
  
      _updateSearchValue (value) {
          this.setState({
              searchValue: value
          });
      }
  
      render () {
          const employees = this.props.employees;
          let filteredEmployees = employees.filter(
                  (employee) =&gt; {
                      return employee.name.indexOf(this.state.searchValue) !== -1;
                  }
              );
          return (
              &lt;div className='header_search'&gt;
                  &lt;ul&gt;
                      {filteredEmployees.map((employee) =&gt; {
                          return &lt;EmployeeTable
                              employees={employee}
                              key={employee.id}
                              /&gt;;
                      })}
                  &lt;/ul&gt;
                  &lt;TextInput
                      label='Search for people'
                      value={this.state.searchValue}
                      onChange={(e) =&gt; this._updateSearchValue(e.target.value)}
                      /&gt;
              &lt;/div&gt;
          );
      }
  }
  export default HeaderSearch;
  </code></pre>
  
  <p>I'm a newbie at ReactJS so I'm getting stuck on this problem. I realize this question has been asked and I looked through them all but still couldn't find a solution as to why I'm getting this error. I want to filter the array <code>employees</code> according to the <code>searchValue</code> and display the update <code>Employee Table</code>. </p>