-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine hooks to hopefully deprecate useBrowserControls (#1022)
@hanbyul-here it might be cleaner to just still use the `useCatalogView` hook. Just moved the qs-state logic over here instead and exposed it from this hook since Actions are the exact same, it can reference the same action logic `onCatalogAction`. We can actually start deprecating and removing all `useBrowserControl` logic, right now `stories/hub` is still using it but we can probably port it over. This way we have one hook managing separate states and exposing them which I think is better than having duplicated logic. We could create a separate hook though to make it more explicit but both can use the same actions logic `onCatalogAction`. I know we probably dont want to use qs-state-hook. We can probably work on updating that logic later or in this PR whichever you see fit. Feel free to fix naming.. naming isn't great here, was just trying to combine and see if this is better
- Loading branch information
Showing
3 changed files
with
51 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters