
This updates live as the Job progresses, until we show the "Posted to Slack" output
Setting up your project for hooks
This guide assumes that your project is already setup and you have a Job running. If not, you should follow the quick start guide first.1
Install the package
Add the
@trigger.dev/react
package to your project:2
Get your public API key
In the Trigger.dev dashboard you should go to your Project and then the “Environments & API Keys” page.
You should copy the

PUBLIC
API key for the dev environment.What's a public API key?
What's a public API key?
A public API key is a key that can be used in the browser. It can only be used to read certain
data from the API and can not write data. This means that it can be used to get the status of a
Job Run, but not to start a new Job Run.
3
Setting up environment variables
Add the Your private API key should already be in there.
NEXT_PUBLIC_TRIGGER_PUBLIC_API_KEY
environment variable to your project. This will be used by the TriggerProvider
component to connect to the Trigger API..env.local
NEXT_PUBLIC_
is a special prefix that exposes the environment variable to your users’ web browsers.4
Add the <TriggerProvider> component
The TriggerProvider component is a React Context Provider that will make the Trigger API client available to all child components.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.
app/layout.tsx