---
source_url: https://www.pubnub.com/docs/sdks/javascript/choose-runtime
title: Choose your runtime for the PubNub JavaScript SDK
updated_at: 2026-11-09T13:29:01.000Z
sdk_name: PubNub JavaScript SDK
sdk_version: 13.1.3
description: Understand how the PubNub JavaScript SDK differs across browser, Node.js, React, and React Native, and pick the quickstart that matches your runtime.
---

# Choose your runtime for the PubNub JavaScript SDK

PubNub JavaScript SDK, use the latest version: 13.1.3

Install:

```bash
npm install pubnub@13.1.3
```

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

The PubNub JavaScript SDK adds PubNub real-time messaging to browser, server, and mobile applications. PubNub concepts and API usage are the same on every runtime. This page explains where the runtimes differ and which quickstart to follow.

## How the runtimes differ

There is one quickstart for each runtime. Lifecycle management and UI updates differ between runtimes. The PubNub API calls do not.

| Runtime | Use it for | Quickstart |
| --- | --- | --- |
| **Web** | Browser-based applications | [Quickstart: Web](https://www.pubnub.com/docs/sdks/javascript/quickstart-web.md) |
| **Node.js** | Server-side applications | [Quickstart: Node.js](https://www.pubnub.com/docs/sdks/javascript/quickstart-node.md) |
| **React** | Browser-based React applications using hooks and components | [Quickstart: React](https://www.pubnub.com/docs/sdks/javascript/quickstart-react.md) |
| **React Native** | Mobile app development | [Quickstart: React Native](https://www.pubnub.com/docs/sdks/javascript/quickstart-react-native.md) |

The SDK also works in frameworks such as Angular and Vue. Follow the quickstart for the runtime your framework builds on.

## JavaScript and TypeScript

You can use JavaScript or TypeScript on every runtime. The only difference is how you import PubNub, which depends on your module format. To install the SDK, set up TypeScript, or pick between ES Modules and CommonJS, refer to [Set up your JavaScript environment](https://www.pubnub.com/docs/sdks/javascript/set-up-your-environment.md).

## Next steps

* [Quickstart: Web](https://www.pubnub.com/docs/sdks/javascript/quickstart-web.md). Send your first message in the browser.
* [Quickstart: Node.js](https://www.pubnub.com/docs/sdks/javascript/quickstart-node.md). Send your first message from a server.
* [Set up your JavaScript environment](https://www.pubnub.com/docs/sdks/javascript/set-up-your-environment.md). Install the SDK and set up TypeScript before you start a quickstart.
* [API reference](https://www.pubnub.com/docs/sdks/javascript/api-reference/configuration.md). Look up a method.

Last updated at: 2026-11-09T13:29:01.000Z
