I can't get IonIcon to work

Apologies if this isn’t in the correct category.


I am trying to use the IonIcon component:

  <IonIcon name="clock" color="primary" />

But I can’t get it to work with the clock icon (or almost any icon, it only seems to work with the close icon).

I am using "@ionic/react": "^4.11.0", and "ionicons": "^4.6.3",.

Any help is appreciated.

I’ve never used ionic/react is the language different from standard Ionic code??

    <ion-icon name="clock"></ion-icon>
import { addIcons } from "ionicons";
import { clock } from "ionicons/icons";

  "ios-clock": clock.ios,
  "md-clock": clock.md


Please import icon from ionicons/icons as shown below

import { alarmOutline } from ‘ionicons/icons’;

use it in your code as follows