```mermaid 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 the `querySender` sends a request to the server
The
Search formcomponent should allow the following configuration*:useSearchFormhook accepts all the form properties as arguments.search queryis prepared to be sent to the serversearchis started by the user thequerySendersends a request to the server