You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/guides/react-hooks.mdx
+11-17Lines changed: 11 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,15 @@ Add the `@trigger.dev/react` package to your project:
20
20
<CodeGroup>
21
21
22
22
```bash npm
23
-
npm install @trigger.dev/react@next
23
+
npm install @trigger.dev/react@latest
24
24
```
25
25
26
26
```bash pnpm
27
-
pnpm install @trigger.dev/react@next
27
+
pnpm install @trigger.dev/react@latest
28
28
```
29
29
30
30
```bash yarn
31
-
yarn add @trigger.dev/react@next
31
+
yarn add @trigger.dev/react@latest
32
32
```
33
33
34
34
</CodeGroup>
@@ -42,9 +42,9 @@ In the Trigger.dev dashboard you should go to your Project and then the "Environ
42
42
You should copy the `PUBLIC` API key for the dev environment.
43
43
44
44
<Accordiontitle="What's a public API key?">
45
-
A public API key is a key that can be used in the browser. It can only be used
46
-
to read certain data from the API and can not write data. This means that it
47
-
can be used to get the status of a Job Run, but not to start a new Job Run.
45
+
A public API key is a key that can be used in the browser. It can only be used to read certain
46
+
data from the API and can not write data. This means that it can be used to get the status of a
47
+
Job Run, but not to start a new Job Run.
48
48
</Accordion>
49
49
50
50
### 3. Add the env var to your project
@@ -67,17 +67,11 @@ The [TriggerProvider](/sdk/react/triggerprovider) component is a React Context P
67
67
Generally you'll want to add this to the root of your app, so that it's available everywhere. However, you can add it lower in the hierarchy but it must be above any of the hooks.
68
68
69
69
```tsx app/layout.tsx
70
-
exportdefaultfunction RootLayout({
71
-
children,
72
-
}: {
73
-
children:React.ReactNode;
74
-
}) {
70
+
exportdefaultfunction RootLayout({ children }: { children:React.ReactNode }) {
0 commit comments