# General Translation React SDKs (gt-react, gt-next): useSetRegion
URL: https://generaltranslation.com/en-GB/docs/react/reference/hooks/use-set-region.mdx
---
title: useSetRegion
description: Change the active region with General Translation gt-react. API reference for useSetRegion.
---
The `useSetRegion` hook returns a function that changes the active region. It is client-side only.
*Available in `gt-react` and `gt-react-native`. Examples import from `gt-react`; import from your framework's package instead.*
*Note: not exported by `gt-next` or `gt-tanstack-start`.*
## Overview [#overview]
Call `useSetRegion` to get the setter, then call it with a region code.
```tsx
import { useSetRegion } from 'gt-react';
export default function RegionButton() {
const setRegion = useSetRegion();
return ;
}
```
*Note: `useSetRegion` is client-side only and must be used within a [``](/docs/react/reference/components/gt-provider).*
## How it works [#how-it-works]
Calling the returned function stores the chosen region in a cookie and reloads the page so region-specific formatting is applied. Passing `undefined` clears the region.
## Returns [#returns]
**Type** `(region: string | undefined) => void`
A function that sets the active region to the given code, or clears it when passed `undefined`.
## Notes [#notes]
* `useSetRegion` is client-side only.
* To read the active region, use [`useRegion`](/docs/react/reference/hooks/use-region). For a ready-made switcher, use [``](/docs/react/reference/components/region-selector).