Chalarangelo / Chalarangelo/furl
Add state to Search component
- Dominant language
- JavaScript
- Stars
- 33
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
`Search` renders `children`.
However, this can cause a few problems, as the developer has to handle state changes by rendering or hiding the `Search` contents, probably via the `onChange` event.
It should be refactored to have an internal state, so that `Search` handles focusing/unfocusing by showing/hiding its results.
On a side note, it might be a good idea to add a clear button or something similar to the component, so that it is more of a unique component and not just another `Input`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Search component and reading how it renders children and exposes onChange. Trace the focus and unfocus behavior, then define completion as Search managing visibility of its results through internal state; the optional clear button is a separate consideration and should not expand the core change without clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100