> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading From V3

> Upgrade from CometChat JavaScript SDK v3 to v4 with package and import changes.

## Upgrading From v3

Upgrading from v3.x to v4 is fairly simple. Below are the major changes that are released as a part of CometChat v4:

Please follow the [setup](/sdk/javascript/setup-sdk) instructions to upgrade to latest version of V4 before proceeding further

## Dependency Change

## Chat SDK

<Tabs>
  <Tab title="JavaScript">
    ```bash theme={null}
    # Remove v3 packages
    npm uninstall @cometchat-pro/chat @cometchat-pro/calls

    # Install v4 packages

    npm i @cometchat/chat-sdk-javascript
    npm i @cometchat/calls-sdk-javascript

    ```
  </Tab>
</Tabs>

## Update Import Statements

Find and replace all import statements across your project:

| SDK       | v3 Import                                               | v4 Import                                                          |
| --------- | ------------------------------------------------------- | ------------------------------------------------------------------ |
| Chat SDK  | `import { CometChat } from '@cometchat-pro/chat'`       | `import { CometChat } from '@cometchat/chat-sdk-javascript'`       |
| Calls SDK | `import { CometChatCalls } from '@cometchat-pro/calls'` | `import { CometChatCalls } from '@cometchat/calls-sdk-javascript'` |

```javascript theme={null}
// v4 Chat SDK
import { CometChat } from '@cometchat/chat-sdk-javascript';

// v4 Calls SDK
import { CometChatCalls } from '@cometchat/calls-sdk-javascript';
```

<Note>
  The API methods, class names, and listener interfaces are unchanged between v3
  and v4. Once you update the packages and imports, your existing code should
  work without further modifications.
</Note>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Setup SDK" icon="gear" href="/sdk/javascript/setup-sdk">
    Install and configure the CometChat JavaScript SDK
  </Card>

  <Card title="Changelog" icon="clock-rotate-left" href="/sdk/javascript/changelog">
    Latest SDK version and release notes
  </Card>

  <Card title="Best Practices" icon="star" href="/sdk/javascript/best-practices">
    Recommended patterns for building with the SDK
  </Card>

  <Card title="Key Concepts" icon="book" href="/sdk/javascript/key-concepts">
    Learn the core concepts behind CometChat v4
  </Card>
</CardGroup>
