-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/search component #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'm not super familiar with debounce so I can't give the most thorough review. One thing you might want to add/consider is some kind of validation of the search value like making it all lowercase, removing special characters, escaping spaces, that kind of thing, but it looks like there is another issue for those things!
})); | ||
|
||
export default function Header() { | ||
export default function Header({ children }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactor, I've never seen this done before but it's great not to have to prop drill!
Addresses #109
Changes
Home
component state and included it in the query parameters in the fetch call to/leads
.Search
component that takes a time limit in milliseconds and an event handler as props. After the time limit expires the event handler is passed an onchange event from a text input.Header
component to accept child props and pass theSearch
component as a child inHome.js
. This was to allow passingsetSearch
as a prop to theSearch
component without prop drilling through theHeader
component.Notes