rrag / react-stockcharts

Highly customizable stock charts with ReactJS and d3
http://rrag.github.io/react-stockcharts
MIT License
3.9k stars 962 forks source link

compatibility with next.js -- a lot of warnings and errors #809

Open c9s opened 2 years ago

c9s commented 2 years ago

really love this chart library, however, when I am trying to integrate this library with next.js, there are many warnings and errors

image
c9s commented 2 years ago
image
c9s commented 2 years ago

Text version:

Warning: Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: Chart, ChartCanvas, CrossHairCursor, GenericChartComponent, GenericComponent, Label, XAxis, YAxis

Learn more about this warning here: https://reactjs.org/link/legacy-context
    at ChartCanvas (webpack-internal:///./node_modules/react-stockcharts/es/lib/ChartCanvas.js:314:3)
    at CandleStickChartWithAnnotation (webpack-internal:///./src/Chart.js:52:22)
    at div
    at main
    at div
    at Home (webpack-internal:///./pages/index.tsx:25:62)
    at MyApp (webpack-internal:///./pages/_app.tsx:37:27)
    at ErrorBoundary (webpack-internal:///./node_modules/next/dist/compiled/@next/react-dev-overlay/client.js:8:20746)
    at ReactDevOverlay (webpack-internal:///./node_modules/next/dist/compiled/@next/react-dev-overlay/client.js:8:23395)
    at Container (webpack-internal:///./node_modules/next/dist/client/index.js:323:9)
    at AppContainer (webpack-internal:///./node_modules/next/dist/client/index.js:825:26)
    at Root (webpack-internal:///./node_modules/next/dist/client/index.js:949:27)
qiyang14 commented 10 months ago

I face the same issue