ionic-react

Guide Ionic React development with routing and lifecycle hooks.

37|1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/capawesome-team/skills --skill ionic-react
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ionic-react
Source: https://github.com/capawesome-team/skills/tree/main/skills/ionic-react
Command: npx skills add https://github.com/capawesome-team/skills --skill ionic-react

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ionic React development often suffers from navigation pitfalls and lifecycle management. This Skill provides explicit guidance on building Ionic apps with React, routing patterns, and lifecycle hooks to ensure correct page structure and predictable behavior.

Core Features & Use Cases

  • Enforces a consistent page structure with IonPage at the root and IonRouterOutlet for transitions.
  • Teaches React-specific Ionic patterns: IonReactRouter routing, useIonRouter navigation, and lifecycle hooks like useIonViewWillEnter, useIonViewDidEnter, useIonViewWillLeave, and useIonViewDidLeave.
  • Covers common UI patterns such as Tabs and Menus, overlays, and state-management considerations to ensure stable navigation and performance.

Quick Start

Initialize an Ionic React project, set up Ionic React with setupIonicReact(), implement routing with IonReactRouter and IonRouterOutlet, and render a sample page using IonPage.

Frequently Asked Questions about ionic-react

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up routing in an Ionic React app?

Ionic React routing uses IonReactRouter and IonRouterOutlet to manage page transitions. You must wrap your routes with IonReactRouter and render pages inside IonRouterOutlet to ensure proper navigation behavior.

Why do my Ionic React page transitions not work correctly?

Ionic React page transitions fail when pages lack IonPage as their root component. Every page component must be wrapped with IonPage to register properly with the IonRouterOutlet and trigger correct transition animations.

How do I run logic when an Ionic React page becomes active?

Ionic React provides lifecycle hooks such as useIonViewWillEnter and useIonViewDidEnter to execute logic when a page becomes active. Use these instead of standard React effects for per-visit logic and view transition handling.

What is the correct way to navigate between pages in Ionic React?

Ionic React navigation should use the useIonRouter hook to navigate between pages programmatically. This hook interfaces with IonReactRouter and IonRouterOutlet to maintain predictable navigation stack behavior.

How do I handle state management for overlays and menus in Ionic React?

State management for Ionic React overlays and menus requires careful coordination with Ionic lifecycle hooks. Manage overlay visibility and menu state using React state while respecting useIonViewWillLeave and useIonViewDidLeave for proper cleanup.

Do I need setupIonicReact before using Ionic React components?

Yes, setupIonicReact must be called during project initialization to configure Ionic React components. This setup ensures components like IonPage, IonReactRouter, and lifecycle hooks function correctly within your React application.