@saykit/react 0.0.0-beta-20260516100428 → 0.0.0-beta-20260518054749
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @saykit/react
|
|
2
|
+
|
|
3
|
+
> React integration for [SayKit](https://saykit.js.org).
|
|
4
|
+
|
|
5
|
+
A `<Say>` component for rendering translated content in server and client components, a `<SayProvider>` and `useSay()` for client trees, and a small server runtime (`setSay`, `getSay`, `unstable_createWithSay`).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @saykit/react saykit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You will also need a SayKit build-tool plugin and a `saykit.config.ts`.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Say, SayProvider } from '@saykit/react/client';
|
|
19
|
+
|
|
20
|
+
function App() {
|
|
21
|
+
return (
|
|
22
|
+
<SayProvider locale="fr" messages={fr}>
|
|
23
|
+
<Say>Hello, {name}!</Say>
|
|
24
|
+
<Say.Plural _={count} one="# item" other="# items" />
|
|
25
|
+
</SayProvider>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
[React integration guide](https://saykit.js.org/integrations/react) at [saykit.js.org](https://saykit.js.org).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saykit/react",
|
|
3
|
-
"version": "0.0.0-beta-
|
|
3
|
+
"version": "0.0.0-beta-20260518054749",
|
|
4
4
|
"description": "React integration for saykit, i18n hooks and components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^19.2.14",
|
|
50
|
-
"react": "^19.2.
|
|
51
|
-
"saykit": "^0.0.0-beta-
|
|
50
|
+
"react": "^19.2.6",
|
|
51
|
+
"saykit": "^0.0.0-beta-20260518054749"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "*",
|
|
55
|
-
"saykit": "0.0.0-beta-
|
|
55
|
+
"saykit": "0.0.0-beta-20260518054749"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"check": "tsc --noEmit",
|