Good day, only recently began to teach React, so please do not judge me harshly. I'm trying to write a search component, but all the time I get an error. I can not understand why and what I am doing wrong. All code here is https://github.com/VadoSevich/React-MyPractice-/blob/master/React%234/note.js . But this is actually the place where it finds an error (the string with handleSearch). Thank you in advance.
var Search = React.createClass({ render: function() { handleSearch: function(event) { var searchQuery = event.target.value.toLowerCase(); var displayedContacts = notes.filter(function(el) { var searchValue = el.name.toLowerCase(); return searchValue.indexOf(searchQuery) !== -1; }); }, return ( <input type="text" className="search" onChange={this.handleSearch}/> ); } });