1

I'm using primereact and react-google-charts. However, they both want me to call the components as Charts. When I write a chart, I get an error. What solution should I follow?

(https://i.stack.imgur.com/4qGie.png)(https://i.stack.imgur.com/5dpNr.png)

I tried calling the components as chart VSCode gave an error. Then I tried as Gantt and got the above error

Melloware
  • 10,435
  • 2
  • 32
  • 62
SelimSezer
  • 29
  • 6

1 Answers1

2

you can use import aliases

import {Chart as GoogleChart} from 'react-google-charts';
import {Chart as PrimeChart} from 'primereact';

now use GoogleChart and PrimeChart wherever you want

<GoogleChart />
<PrimeChart />
jagjeet
  • 585
  • 2
  • 10