# Migrating to io.Connect Browser

Source: https://docs.interop.io/browser/getting-started/migrating-to-io-connect/index.html

## Overview

**Glue42 Core** and **Glue42 Core+** are now **io.Connect Browser**. It's now required to have a valid license key to create an **io.Connect Browser** project, as **Glue42 Core** is deprecated as a free option. All related libraries are also no longer open-source.

## Libraries

All web libraries are now published in the [`@interopio`](https://www.npmjs.com/search?q=interopio) scope in NPM.

The following table lists the renamed JavaScript, React and Angular libraries in the new scope:

| Previous Name | New Name | Description |
|---------------|----------|-------------|
| `@glue42/core` | [`@interopio/core`](https://www.npmjs.com/package/@interopio/core) | JavaScript library used in the **io.Connect Browser** Main app and its client apps. Subset of the [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) and the [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) libraries which offers basic functionalities for sharing data between apps. |
| `@glue42/web` | [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) | JavaScript library for **io.Connect Browser** client apps. |
| `@glue42/web-platform`, `@glue42/core-plus` | [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) | JavaScript library for creating a Main app for **io.Connect Browser**. |
| `@glue42/web-worker` | [`@interopio/browser-worker`](https://www.npmjs.com/package/@interopio/browser-worker) | JavaScript library used in a Service Worker for the Main app of **io.Connect Browser**. |
| `@glue42/fdc3` | [`@interopio/fdc3`](https://www.npmjs.com/package/@interopio/fdc3) | JavaScript library providing an io.Connect implementation of the FDC3 standards. |
| `@glue42/intents-resolver-api` | [`@interopio/intents-resolver-api`](https://www.npmjs.com/package/@interopio/intents-resolver-api) | JavaScript library for implementing the functionality of a [custom Intent Resolver App](https://docs.interop.io/browser/capabilities/data-sharing/intents/overview/index.md#extending_the_intent_resolver). |
| `@glue42/ng` | [`@interopio/ng`](https://www.npmjs.com/package/@interopio/ng) | Angular library for  **io.Connect Browser** client apps. |
| `@glue42/react-hooks` | [`@interopio/react-hooks`](https://www.npmjs.com/package/@interopio/react-hooks) | React library for  **io.Connect Browser** client apps. |
| `@glue42/workspaces-api` | [`@interopio/workspaces-api`](https://www.npmjs.com/package/@interopio/workspaces-api) | JavaScript library for manipulating [Workspaces](https://docs.interop.io/browser/capabilities/windows/workspaces/overview/index.md) in **io.Connect Browser**. |
| `@glue42/workspaces-ui-react` | [`@interopio/workspaces-ui-react`](https://www.npmjs.com/package/@interopio/workspaces-ui-react) | React library for building a [custom Workspaces App](https://docs.interop.io/browser/capabilities/windows/workspaces/workspaces-app/index.md). |

For new apps or apps in development, it's strongly recommended to start using the new packages.

The old libraries in the `@glue42` scope are still available and compatible with **io.Connect Browser**, so it isn't necessary to upgrade your older apps. If you want to migrate your older apps to the new libraries, you only need to update the imports with the new library names, and optionally update the names of the factory functions (if you are using TypeScript, see the [TypeScript](#breaking_changes-typescript) section for further details on what else you must update). The new libraries support the old factory functions, so it isn't mandatory to update them.

You may also need to update the `.npmrc` file because of the new `@interopio` scope.

## Breaking Changes

The following sections describe the major changes introduced by the new io.Connect libraries. Some of the changes won't break your existing implementations, as they are backwards compatible - e.g., in the JavaScript libraries, both the old and new factory functions are supported, as well as the old `glue42core` and the new `iobrowser` objects injected in the global `window` object.

### JavaScript

The `glue42core` object injected in the global `window` object and used for accessing io.Connect functionalities before the io.Connect library initialization has completed, is now named `iobrowser`. The previous name is still supported.

The following factory functions have been renamed:

| Previous Name | New Name | Library |
|---------------|----------|---------|
| `GlueCore()` | `IOConnectCore()` | [`@interopio/core`](https://www.npmjs.com/package/@interopio/core) |
| `GlueIntentsResolver()` | `IOConnectIntentsResolver()` | [`@interopio/intents-resolver-api`](https://www.npmjs.com/package/@interopio/intents-resolver-api) |
| `GlueWeb()` | `IOBrowser()` | [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) |
| `GlueWebPlatform()`, `GlueCorePlus()` | `IOBrowserPlatform()` | [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) |
| `GlueWebWorker()` | `IOWorker()` | [`@interopio/browser-worker`](https://www.npmjs.com/package/@interopio/browser-worker) |
| `GlueWorkspaces()` | `IOWorkspaces()` | [`@interopio/workspaces-api`](https://www.npmjs.com/package/@interopio/workspaces-api) |

The previous factory function names are still supported.

The [configuration object](https://docs.interop.io/browser/developers/browser-platform/setup/index.md#configuration) for initializing the [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) library now has a required `licenseKey` property which you must use to provide a valid license key for your **io.Connect Browser** project.

Also, the following properties of the [configuration object](https://docs.interop.io/browser/developers/browser-platform/setup/index.md#configuration) for the `IOBrowserPlatform()` factory function have been renamed:

| Previous Name | New Name |
|---------------|----------|
| `glue` | `browser` |
| `glueFactory` | `browserFactory` |
| `server` | `manager` |

The `glue` property of the object returned from [initializing](https://docs.interop.io/browser/developers/browser-platform/setup/index.md#initialization) the [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) library, which grants access to the io.Connect APIs, has been renamed to `io`:

```javascript
const config = { licenseKey: "my-license-key" };

const { io, platform } = await IOBrowserPlatform(config);
```

### TypeScript

If you are using TypeScript, take into consideration that some type names are different in the new libraries.

The following types have been renamed in the [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42WebPlatform` | `IOConnectBrowserPlatform` |
| `Server` | `Manager` |

The following types have been renamed in the [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42Web` | `IOConnectBrowser` |

The following types have been renamed in the [`@interopio/core`](https://www.npmjs.com/package/@interopio/core) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42Core` | `IOConnectCore` |
| `GlueCore` | `API` |
| `GlueCoreFactoryFunction` | `IOConnectCoreFactoryFunction` |

The following types have been renamed in the [`@interopio/workspaces-api`](https://www.npmjs.com/package/@interopio/workspaces-api) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42Workspaces` | `IOConnectWorkspaces` |

The following types have been renamed in the [`@interopio/intents-resolver-api`](https://www.npmjs.com/package/@interopio/intents-resolver-api) library:

| Previous Name | New Name |
|---------------|----------|
| `GlueIntentsResolverFactoryFunction` | `IOConnectIntentsResolverFactoryFunction` |

### React

The following contexts, components and hooks have been renamed in the [`@interopio/react-hooks`](https://www.npmjs.com/package/@interopio/react-hooks) library:

| Previous Name | New Name |
|---------------|----------|
| `GlueContext` | `IOConnectContext` |
| `<GlueProvider />` | `<IOConnectProvider />` |
| `useGlue()` | `useIOConnect()` |
| `useGlueInit()` | `useIOConnectInit()` |

If you are using TypeScript with React, consider that the following types have been renamed in the [`@interopio/react-hooks`](https://www.npmjs.com/package/@interopio/react-hooks) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42DesktopFactory` | `IOConnectDesktopFactory` |
| `Glue42ReactConfig` | `IOConnectReactConfig` |
| `Glue42ReactFactory` | `IOConnectReactFactory` |
| `GlueInitSettings` | `IOConnectInitSettings` |
| `GlueProviderProps` | `IOConnectProviderProps` |
| `UseGlueInitFunc` | `UseIOInitFunc` |

The following properties of the `IOConnectInitSettings` object have been renamed:

| Previous Name | New Name |
|---------------|----------|
| `web` | `browser` |
| `webPlatform` | `browserPlatform` |

The `glue` property of the `<Workspaces />`, `<AddApplicationPopup />`, `<AddWorkspacePopup />` and `<SaveWorkspacePopup />` components in the  [`@interopio/workspaces-ui-react`](https://www.npmjs.com/package/@interopio/workspaces-ui-react) library has been renamed to `io`. A new `<Logo />` component is available to be used instead of the `<GlueLogo />` component. The `<GlueLogo />` component is still supported.

### Angular

The following modules and services have been renamed in the [`@interopio/ng`](https://www.npmjs.com/package/@interopio/ng) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42Ng` | `IOConnectNg` |
| `Glue42Store` | `IOConnectStore` |

The `getGlue()` method of the `IOConnectStore` service has been renamed to `getIOConnect()`.

The following types have been renamed in the [`@interopio/ng`](https://www.npmjs.com/package/@interopio/ng) library:

| Previous Name | New Name |
|---------------|----------|
| `Glue42DesktopFactoryFunction` | `IODesktopFactoryFunction` |
| `Glue42NgFactory` | `IOConnectNgFactory` |
| `Glue42NgFactoryConfig` | `IOConnectNgFactoryConfig` |
| `Glue42NgSettings` | `IOConnectNgSettings` |

The following properties of the `IOConnectNgSettings` object have been renamed:

| Previous Name | New Name |
|---------------|----------|
| `web` | `browser` |
| `webPlatform` | `browserPlatform` |
