# General Translation Changelog: gt-react 10.15.0: derive() in tagged templates
URL: https://generaltranslation.com/en-GB/blog/gt-react_v10_15_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-03-18

import Video from '@/components/Video';

## The `declareStatic()` → `derive()` rename

This release is the first to ship with the new [`derive()`](/docs/react/reference/functions/derive) name. Previously, this function was called `declareStatic()` and the JSX component was `<Static>`. In [PR #1062](https://github.com/generaltranslation/gt/pull/1062), both were renamed to [`derive()`](/docs/react/reference/functions/derive) and [`<Derive>`](/docs/react/reference/components/derive) for clarity.

<Video src="https://assets.gtx.dev/derive-animation.mp4" />

## Overview

This release builds on `gt-react`&#39;s [move away from React context](/devlog/gt-react_v10_12_0) and the [`t` tagged template macro](/devlog/gt-react_v10_13_0). [`derive()`](/docs/react/reference/functions/derive) now works inside the [`t`](/docs/react/reference/functions/t-function) tagged template literal. Previously, [`derive()`](/docs/react/reference/functions/derive) could only be used inside [`t()`](/docs/react/reference/functions/t-function) function calls:

```jsx
t("The {subject} is playing.", { subject: derive(getSubject(gender)) })
```

Now you can write it directly in a template literal:

```jsx
t`The ${derive(getSubject(gender))} is playing.`
```

## How it works

[`derive()`](/docs/react/reference/functions/derive) tells the CLI tool to analyse all possible return values of a function and create a separate translation entry for each one. This preserves grammatical agreement across languages — for example, in Spanish, &quot;The boy is playing&quot; and &quot;The girl is playing&quot; require different articles (*El niño* vs *La niña*).

## Example

```jsx
import { t } from "gt-react/browser";
import { derive } from "gt-react";

function getSubject(gender) {
  return gender === "male" ? "boy" : "girl";
}

function Component({ gender }) {
  return <p>{t`The ${derive(getSubject(gender))} is playing.`}</p>;
}
```

This creates two translation entries:

* &quot;The boy is playing.&quot;
* &quot;The girl is playing.&quot;


## Links

* [Previous dev log: t tagged template literal (gt-react@10.13.0)](/devlog/gt-react_v10_13_0)
* [`derive()` API reference](/docs/react/reference/functions/derive)
* [PR #1129](https://github.com/generaltranslation/gt/pull/1129)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
