React VictoryChartImpl Invalid hook

Viewed 44

Error occours when using the VictoryChart however VictoryBar renders fine? Following getting started: https://formidable.com/open-source/victory/docs

react-dom.development.js:18687 The above error occurred in the <VictoryChartImpl> component:




    import React from 'react';
        import { VictoryBar, VictoryChart  } from 'victory';
        
        
        const data = [
          {quart

er: 1, earnings: 13000},
      {quarter: 2, earnings: 16500},
      {quarter: 3, earnings: 14250},
      {quarter: 4, earnings: 19000}
    ];
    
      export default function Card(){
          return (
            <VictoryChart>
              <VictoryBar
              data={data}
              x="quarter"
              y="earnings"
            />
          </VictoryChart>
        );
      }
    
        
      
0 Answers
Related