-2

I am trying to import IonAccordion and IonAccordionGroup, but I'm facing error like "Line 38:16: 'IonAccordionGroup' is not defined react/jsx-no-undef". And I'm using library type as react for ionic app development. And latest version of ionic and react. Here I've attached the picture

Thank You

Manoj
  • 17
  • 1

1 Answers1

0

This should be as simple as including the following lines at the top of your Menu.tsx file:

import React from 'react';
import { IonAccordionGroup } from '@ionic/react';

Note that IonAccordion is a new component for Ionic React 6 and you will need to upgrade to version 6 if you are using an older version of Ionic React.

Patrick Kenny
  • 4,515
  • 7
  • 47
  • 76