Skip to main content

Dependencies and Compatibility

The package.json generated by the current @corva/create-app release is the compatibility baseline for a new frontend app. It already includes React, @corva/ui, Corva build configuration, testing tools, and the visualization dependencies used by the starter.

Use the generated versions

  • Do not copy a dependency list from another app or from an old documentation page.
  • Do not install @corva/ui again immediately after scaffolding; it is already included.
  • Keep React and React DOM on the generated versions unless Corva publishes a migration path.
  • Add third-party packages only when the app needs them.
  • Commit the lockfile created by the selected package manager.

The generated project can use npm or Yarn. Use one package manager consistently within the project.

Corva UI imports

Import supported resources through the public package entrypoints:

import { AppContainer, AppHeader, Button } from '@corva/ui/componentsV2';
import { useAppCommons } from '@corva/ui/effects';
import { corvaAPI, corvaDataAPI, socketClient } from '@corva/ui/clients';
import { AppTestWrapper } from '@corva/ui/testing';

Paths such as @corva/ui/clients and @corva/ui/componentsV2 are package entrypoints, not separate dependencies.

Prefer componentsV2 for new application code. Use older @corva/ui/components imports only when maintaining a legacy app that has not yet migrated.

Add a dependency

npm install package-name

or:

yarn add package-name

Before adding a library, check its browser support, React peer dependencies, bundle size, license, and whether Corva UI already provides the behavior.

Upgrade an existing app

Upgrade deliberately:

  1. Create a branch and record the current working versions.
  2. Compare the app with a newly generated project for configuration changes.
  3. Upgrade @corva/ui and related generated dependencies together when required.
  4. Run lint, tests, and the production build.
  5. Test drilling or completion asset changes, settings, fullscreen elements, and charts locally.

Avoid using a broad package-manager upgrade as the first step. Generated configuration and package versions can be coupled.

Find current component APIs

Use the Corva UI Storybook for component examples. Newly generated projects also include the Corva UI MCP configuration, which can search supported components, hooks, clients, constants, themes, and testing utilities directly from the installed package.