-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
flowchart
subgraph state[App state]
searchResults
end
subgraph useSearchForm
validator
queryBuilder
querySender
end
subgraph form[Search form]
address
dates[check-in/out dates]
guests
num[Num rooms]
end
subgraph server
search_api
end
querySender --> useDispatch
useDispatch <--> state
form <--> useSearchForm
search[Search start] -.-> querySender
querySender -.-> search_api
- Address/city
- Check-in/out dates selector
- Guests (adult/children)
- Num rooms
The Search form
component should allow the following configuration*:
- default address/city
- default dates range
*This configuration must be provided via app config
useSearchForm
hook accepts all the form properties as arguments.
- When any of the arguments are changed in the state they must be validated and the
search query
is prepared to be sent to the server - When
search
is started by the user thequerySender
sends a request to the server