Contribute to Bluesky Community. Read more
ReactVite

Vite

Installation

Follow the installation docs in the Introduction.

Usage

In any component, import PostThread from react-bluesky-embed and use it like so:

import { PostThread } from "react-bluesky-embed";
 
export const IndexPage = () => (
  <PostThread
    params={{
      did: "did:plc:gru662w3omynujkgwebgeeof",
      rkey: "3lbirib5xnc2u",
    }}
  />
);

You can learn more about PostThread in the Bluesky theme docs.

Running the test app

Clone the react-bluesky-embed repository and then run the following command:

pnpm install && pnpm dev --filter=vite-app...

The app will be up and running at http://localhost:5173 for the Vite app example.

The app shows the usage of react-bluesky-embed in different scenarios:

The source code for react-bluesky-embed is imported from packages/react-bluesky-embed and any changes you make to it will be reflected in the app immediately.