Skip to content

How to add methods to useThemeUI hook? #1193

Answered by hasparus
moecasts asked this question in General
Discussion options

You must be logged in to vote

I suppose the simplest way would be using composition

export function useTheme() {
  const value = useThemeUI()
  return {
    ...value,
    foo() {
      // here
    }
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@moecasts
Comment options

Answer selected by moecasts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants