Skip to content

Commit 64a5a5c

Browse files
committed
add bindings section to react guide
1 parent 0800c16 commit 64a5a5c

File tree

1 file changed

+4
-0
lines changed
  • src/content/docs/workers/frameworks/framework-guides

1 file changed

+4
-0
lines changed

src/content/docs/workers/frameworks/framework-guides/react.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ The following command will build and deploy your project. If you are using CI, e
6363
You can serve static assets in your React application by [placing them in the `./public/` directory](https://vite.dev/guide/assets#the-public-directory). This can be useful for resource files such as images, stylesheets, fonts, and manifests.
6464

6565
<Render file="workers-assets-routing-summary" />
66+
67+
## Use bindings with React
68+
69+
Your new project also contains a Worker at `./api/index.ts`, which you can use as a backend API for your React application. While your React application cannot directly access Workers bindings, it can interact with them through this Worker. You can make [`fetch()` requests](/workers/runtime-apis/fetch/) from your React application to the Worker, which can then handle the request and use bindings. Learn how to [configure Workers bindings](/workers/runtime-apis/bindings/).

0 commit comments

Comments
 (0)