open-bus-map-search icon indicating copy to clipboard operation
open-bus-map-search copied to clipboard

SearchContext creating a Provider for this context

Open ArkadiK94 opened this issue 1 year ago • 6 comments

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

ArkadiK94 avatar Sep 30 '23 17:09 ArkadiK94