Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Applying a ref directly to an HTML element
- <input
- className="AuthorFilterMenu__filter-input"
- ref={authorFilterInputRef}
- placeholder="Filter by author..."
- value={filterInputValue}
- type="search"
- onInput={event => {
- setFilterInputValue(event.currentTarget.value);
- }}
- />
- // Applying a ref to a React component instance
- <AuthorFilterMenu ref={authorFilterInputRef} />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement