Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // Applying a ref directly to an HTML element
  2. <input
  3. className="AuthorFilterMenu__filter-input"
  4. ref={authorFilterInputRef}
  5. placeholder="Filter by author..."
  6. value={filterInputValue}
  7. type="search"
  8. onInput={event => {
  9. setFilterInputValue(event.currentTarget.value);
  10. }}
  11. />
  12.  
  13. // Applying a ref to a React component instance
  14. <AuthorFilterMenu ref={authorFilterInputRef} />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement