> ## Documentation Index
> Fetch the complete documentation index at: https://photonhealth.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Release candidates

> Install @photonhealth/react and @photonhealth/client from npm as 2.0.0 release candidates.

The [React components](https://photonhealth.com/docs/prescribe/embed/react.md) and the [JavaScript client](https://photonhealth.com/docs/prescribe/embed/javascript.md) are on npm as release candidates of 2.0.0. They're the packages the Prescribe app is built on, and you can build with them before the stable release.

| Package | What it is | Docs |
| - | - | - |
| `@photonhealth/react` | `PhotonProvider` and the `PhotonOrder`, `PhotonPatient` and `PhotonPrescription` cards. The cards render through building blocks you can swap for your own components. | [README on npm](https://www.npmjs.com/package/@photonhealth/react) |
| `@photonhealth/client` | `photon({ environment, auth })`: patients, prescriptions and orders as live objects, with `get`, `sync` and `update`. It has no dependencies and runs in browsers and Node. | [README on npm](https://www.npmjs.com/package/@photonhealth/client) |

## Install

Release candidates are published under npm's `rc` tag, as `2.0.0-rc.N`.

```bash React theme={"dark"}
npm install @photonhealth/react@rc
```

```bash JavaScript client only theme={"dark"}
npm install @photonhealth/client@rc
```

`@photonhealth/react` includes the matching `@photonhealth/client`, so you don't install that separately. Include `@rc` until 2.0.0 is released.

The latest release candidate is `2.0.0-rc.1`, for both packages.

The next release candidate adds:

* **Machine credentials** for the JavaScript client, so your backend can call it with its own client id and secret. See [On your backend](https://photonhealth.com/docs/prescribe/embed/javascript.md#on-your-backend).
* **Sig options**: `rx.loadSigs()` in the client, and suggested sigs in `PhotonPrescription`. See [Sig options](https://photonhealth.com/docs/network/prescription.md#sig-options).

## Start in the sandbox

Use `neutron` while you build. See [Environments](https://photonhealth.com/docs/environments.md).

```tsx React theme={"dark"}
import { PhotonOrder, PhotonProvider } from "@photonhealth/react";
import "@photonhealth/react/styles.css";

<PhotonProvider clientId="YOUR_CLIENT_ID" environment="neutron">
  <PhotonOrder patient="pat_…" onSent={() => closeDialog()} />
</PhotonProvider>;
```

```ts JavaScript theme={"dark"}
import { photon } from "@photonhealth/client";

const ph = photon({ environment: "neutron", auth: { clientId: "YOUR_CLIENT_ID" } });
const patient = await ph.patient.get("pat_…");
```

The READMEs cover the rest: sign-in, live objects, errors, each card's props and mapping your own components. These docs cover the same packages in [React components](https://photonhealth.com/docs/prescribe/embed/react.md), [JavaScript client](https://photonhealth.com/docs/prescribe/embed/javascript.md) and [Styling](https://photonhealth.com/docs/prescribe/embed/styling.md).

## What a release candidate means

* Each `2.0.0-rc.N` can change before 2.0.0. Pin an exact version, such as `2.0.0-rc.1`, to choose when you take changes.
* 2.0.0 will be published under npm's `latest` tag. Then you can drop `@rc`.
* `@photonhealth/client/testing`, the helpers for your own tests, may change before 2.0.0.

> [!NOTE]
>
> `@photonhealth/react` 1.x is an earlier, unrelated package with a different API. 2.0.0 isn't an upgrade from it. If you use 1.x, see the [migration guide](https://photonhealth.com/docs/prescribe/embed/migrate-from-elements.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.