For more context information, please read through the release notes.
To see all merged commits on the default branch that will be part of the next plotly.js release, go to:
https://github.com/plotly/react-plotly.js/compare/vX.Y.Z...main
where X.Y.Z is the semver of most recent react-plotly.js release.
- Added native ESM output alongside CJS [#367]
- Published artifacts now live under
dist/instead of at the repo root; themainentry moved fromreact-plotly.jsto./dist/index.cjs - Dropped the unminified UMD bundle
import Plot from 'react-plotly.js'now resolves correctly in Rolldown and any other strict ESM environment
- Published artifacts now live under
- Added TypeScript declaration files (
index.d.ts/factory.d.ts) [#368]
- Update linting dependencies [#366]
- Refactored the wrapper from a class component to a functional component using hooks [#369]
- Refs forwarded to
<Plot>now resolve to the rendered<div>element (the plotly graph div) directly viaforwardRef, instead of to the class instance - Migration: replace
ref.current.elwithref.current
- Refs forwarded to
onPurgenow fires andPlotly.purgeruns on unmount [#372]- Plot is re-initialized correctly after React StrictMode's dev-only simulated unmount/remount [#372]
- TypeScript declarations now expose ref forwarding so consumers can attach a typed
refprop without a TS error [#373]
onClickAnywhereandonHoverAnywhereevent props for the correspondingplotly_clickanywhereandplotly_hoveranywhereevents introduced in plotly.js v3 [#360]
- Migrated CI from CircleCI to GitHub Actions [#362]
- Migrated test framework from enzyme to
@testing-library/reactand bumped jest from 26 to 29 [#363]
- Dropped support for plotly.js v1.x and v2.x; the
plotly.jspeer dependency now requires>=3.0.0[#360] - Dropped support for React versions older than 18; the
reactpeer dependency now requires^18.0.0 || ^19.0.0[#364]
onWebGlContextLostevent prop for theplotly_webglcontextlostevent [#222], with thanks to @markovist for the contribution!
- Updated dependencies [#285]