### `useTheme` | v5

This is a custom hook to get the current theme from a `ThemeProvider`.

```tsx
import { useTheme } from 'styled-components'

function MyComponent() {
  const theme = useTheme()
  console.log('Current theme: ', theme)

  // ...
}
```

> All styled components [automatically receive the theme as a prop](/docs/advanced#theming), so this is only necessary if you wish to access the theme for other reasons.