open-bus-map-search
open-bus-map-search copied to clipboard
SearchContext creating a Provider for this context
There is a SearchContext as an model and in every page we use
const { search, setSearch } = useContext(SearchContext)
and
setSearch((current) => ({ ...current, operatorId: id })) // with some changes in different places
In my opinion, we should create a Provider for this context and make the code cleaner. This Provider would manage the state of search. What do you think? @NoamGaash @ShayAdler