Compatibility

visx Compatibility: React, Next.js, Vite and Browsers

visx 4.0.0 was released in June 2026. The major version changed some compatibility rules, so if you're starting a project or upgrading from v3, here's what works where. The details below come from the official visx migration notes and our own testing of the starter kit.

React versions

React versionvisx 4visx 3
React 19SupportedUse v4 instead
React 18SupportedSupported
React 16 / 17Not supportedSupported (stay on v3)

Preact users can keep aliasing react and react-dom to preact/compat.

Next.js

visx renders standard SVG, so charts can be server-rendered. With the App Router, two things matter:

  • Components that use React hooks or browser APIs (useTooltip, ParentSize, useParentSize) must live in a file marked 'use client'.
  • Width can't be measured on the server, so responsive charts render once the browser knows the container size. Reserve the chart's height with CSS to avoid layout shift.
'use client';
import { ParentSize } from '@visx/responsive';
import BarChart from './BarChart';

export default function RevenueChart({ data }) {
  return (
    <div style={{ height: 320 }}>
      <ParentSize>{({ width }) => <BarChart data={data} width={width} height={320} />}</ParentSize>
    </div>
  );
}

Vite, Remix and strict ESM environments

visx 4 rebuilt its package entry points. Every package now has an exports map with separate import and require builds, and the ESM output uses explicit .js extensions. According to the maintainers, this fixes ERR_MODULE_NOT_FOUND errors seen in strict ESM SSR setups such as Vite SSR, Deno and edge runtimes. Our starter kit builds with Vite 8 with no extra configuration.

Breaking change: deep imports like @visx/shape/lib/shapes/Bar no longer work in visx 4. Import from the package root instead: import { Bar } from '@visx/shape'.

TypeScript

All visx packages include type definitions. In v4, @types/react and @types/react-dom are optional peer dependencies, so install versions that match your React. Keep every @visx/* package on the same major version to avoid duplicate-type errors.

Browser support

visx 4 targets modern browsers. Internet Explorer 11 and other legacy browsers are no longer supported, so use visx 3 if you must support them. Rendered charts are plain SVG, which every current browser handles well:

BrowserStatus
Chrome, Edge (Chromium)Supported
FirefoxSupported
Safari (macOS and iOS)Supported
Chrome and Samsung Internet on AndroidSupported
Internet Explorer 11Not supported in v4

ParentSize and @visx/xychart depend on ResizeObserver, which all modern browsers include.

Other v4 changes that can affect compatibility

  • Runtime propTypes were removed and visx no longer depends on prop-types. Add it yourself if your app relied on it indirectly.
  • Several packages dropped lodash. If your code imported it without declaring it, add it to your own package.json.
  • D3 internals moved to d3-shape v3 and d3-path v3. Declare them yourself if you import them directly.
  • useParentSize now returns a callback parentRef plus a node value. Replace parentRef.current with node.

Hitting an error after upgrading? Our visx troubleshooting checklist covers the usual causes.