Ionic React logo

Ionic React

Organization
capawesome-team
ionic-react

Guides the agent through Ionic Framework development with React — project structure, React-specific Ionic components, IonReactRouter and navigation patterns, Ionic lifecycle hooks (useIonViewWillEnter, useIonViewDidEnter, useIonViewWillLeave, useIonViewDidLeave), state management integration, and React-specific best practices for Ionic apps. Do not use for plain Capacitor React apps without Ionic (use capacitor-react), Ionic with Angular or Vue, creating a new Ionic app (use ionic-app-creation), upgrading Ionic to a newer version (use ionic-app-upgrades), or general Ionic component usage without React-specific context (use ionic-app-development).

Overview

Publishercapawesome-team
Repositoryskills
Skill nameionic-react
Stars
54
Forks
1
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by capawesome-team on GitHub. Read the source before you install it.

Installation

Install the Ionic React AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/capawesome-team/skills/tree/main/skills/ionic-react
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/capawesome-team/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/ionic-react .claude/skills/ionic-react
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ionic React in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ionic React on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ionic React is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Ionic React

Develop Ionic Framework apps with React — project structure, IonReactRouter, React-specific components, lifecycle hooks, state management, and best practices.

Prerequisites

  1. Ionic Framework 7 or 8 with @ionic/react.
  2. React 18 or later.
  3. Node.js and npm installed.
  4. For iOS: Xcode installed.
  5. For Android: Android Studio installed.

Agent Behavior

  • Auto-detect before asking. Check the project for package.json dependencies (@ionic/react, @ionic/react-router, react, @capacitor/core), platforms (android/, ios/), build tools, and TypeScript usage. Only ask the user when something cannot be detected.
  • Guide step-by-step. Walk the user through the process one step at a time. Never present multiple unrelated questions at once.
  • Adapt to the project. Detect the existing code style (TypeScript vs. JavaScript, state management library, routing setup) and generate code that matches.

Procedures

Step 1: Analyze the Project

Auto-detect the following by reading project files:

  1. Ionic version: Read @ionic/react version from package.json.
  2. React version: Read react version from package.json.
  3. Capacitor version: Read @capacitor/core version from package.json (if present).
  4. TypeScript: Check if tsconfig.json exists and if .tsx files are used.
  5. Router: Check if @ionic/react-router and react-router-dom are in package.json.
  6. State management: Check package.json for redux, @reduxjs/toolkit, zustand, jotai, @tanstack/react-query, or similar.
  7. Platforms: Check which directories exist (android/, ios/).
  8. Build tool: Check for vite.config.ts, angular.json, webpack.config.js, etc.

Step 2: Project Structure

A standard Ionic React project follows this structure:

project-root/
├── android/                  # Android native project (Capacitor)
├── ios/                      # iOS native project (Capacitor)
├── public/
├── src/
│   ├── components/           # Reusable UI components
│   ├── hooks/                # Custom React hooks
│   ├── pages/                # Page components (one per route)
│   ├── services/             # Service modules for API and native calls
│   ├── context/              # React context providers
│   ├── theme/
│   │   └── variables.css     # Ionic CSS custom properties
│   ├── App.tsx               # Root component with IonReactRouter
│   └── main.tsx              # Entry point with setupIonicReact()
├── capacitor.config.ts       # Capacitor configuration
├── ionic.config.json         # Ionic CLI configuration
├── package.json
├── tsconfig.json
└── vite.config.ts            # Or other bundler config

If the project does not follow this structure, adapt all guidance to the project's actual directory layout. Do not restructure the project unless the user explicitly asks.

Step 3: App Initialization

The entry point must call setupIonicReact() before rendering the app. This function initializes the Ionic Framework for React.

Verify that src/main.tsx (or src/index.tsx) contains:

typescript
import { setupIonicReact } from '@ionic/react';

setupIonicReact();

setupIonicReact() accepts an optional configuration object for global settings:

typescript
setupIonicReact({
  mode: 'ios',          // Force iOS mode on all platforms ('ios' | 'md')
  rippleEffect: false,  // Disable Material Design ripple effect
  animated: true,       // Enable/disable all animations
});

If setupIonicReact() is missing or called after rendering, Ionic components will not function correctly.

Step 4: Routing and Navigation

Read references/routing.md for complete routing patterns including:

  • IonReactRouter setup
  • IonRouterOutlet page management
  • Tab-based navigation with IonTabs
  • Side menu navigation with IonMenu
  • Programmatic navigation with useIonRouter
  • Route guards and route parameters

Key principles:

  1. Use IonReactRouter instead of React Router's BrowserRouter. It is required for Ionic page transitions.
  2. Use IonRouterOutlet to contain routes. It manages the page stack and transition animations.
  3. Pass component prop to Route — do not use render or children inside IonRouterOutlet.
  4. Use useIonRouter for programmatic navigation — it provides Ionic-aware navigation with transition animations.

Step 5: Ionic Lifecycle Hooks

Read references/lifecycle.md for detailed lifecycle hook usage.

Ionic React pages stay mounted in the DOM after navigation. Standard React useEffect only fires on initial mount, not on every page visit. Use Ionic lifecycle hooks for per-visit logic:

HookUse for
useIonViewWillEnterRefresh data before the page becomes visible
useIonViewDidEnterStart animations or focus inputs after page is visible
useIonViewWillLeavePause media, save draft state
useIonViewDidLeaveCleanup after page is fully hidden

These hooks only work in components that:

  • Are rendered as the component of a Route inside IonRouterOutlet.
  • Render IonPage as their root element.

Step 6: React-Specific Ionic Hooks

Read references/hooks.md for all available hooks and usage examples.

Ionic React provides hooks for presenting overlays and controlling navigation without managing state manually:

HookPurpose
useIonAlertPresent alert dialogs
useIonToastShow toast notifications
useIonActionSheetPresent action sheets
useIonLoadingShow/dismiss loading indicators
useIonModalPresent modals programmatically
useIonPopoverPresent popovers programmatically
useIonPickerPresent picker dialogs
useIonRouterNavigate with Ionic animations

Step 7: React-Specific Component Patterns

Read references/components.md for detailed component patterns including:

  • Page structure with IonPage
  • Inline overlays (modals, popovers) with isOpen binding
  • Pull-to-refresh with IonRefresher
  • Infinite scroll with IonInfiniteScroll
  • Forms with Ionic input components

Key principles:

  1. Every page must render IonPage as root. This is required for transitions and lifecycle hooks.
  2. Use onIonInput for text inputs and onIonChange for select, toggle, checkbox, and range components.
  3. Access values via e.detail.value (or e.detail.checked for toggles/checkboxes).
  4. Use inline overlays with isOpen for simpler state management, or use overlay hooks (useIonModal, useIonAlert, etc.) for imperative usage.

Step 8: State Management

Read references/state-management.md for patterns with React Context, Redux Toolkit, Zustand, and TanStack Query.

Key principles:

  1. Page caching affects state. Since Ionic keeps pages mounted, state persists across navigations. Use useIonViewWillEnter to refresh stale data.
  2. Place providers outside IonReactRouter. Context providers, Redux Provider, and QueryClientProvider should wrap the router so all pages have access.
  3. Do not add a state library unless needed. For simple apps, React Context and useState/useReducer are sufficient.

Step 9: Build and Run

After implementing changes:

bash
npm run build
npx cap sync
npx cap run android
npx cap run ios

For development with live reload:

bash
ionic serve

For native development with live reload:

bash
ionic cap run android --livereload --external
ionic cap run ios --livereload --external

Error Handling

  • Ionic lifecycle hooks not firing: Verify that the component renders IonPage as its root element and is the component of a Route inside IonRouterOutlet. Lifecycle hooks do not fire in child components or components rendered via render/children props.
  • Page transitions not animating: Ensure IonReactRouter is used instead of BrowserRouter. Ensure routes use the component prop, not render or children. Verify IonRouterOutlet is a direct child of IonReactRouter or IonTabs.
  • Stale data after navigating back: Ionic keeps pages mounted in the DOM. Use useIonViewWillEnter to refresh data on every page visit instead of useEffect with [].
  • Tab bar disappears on sub-page: All routes (including detail routes) must be inside the IonRouterOutlet within IonTabs. Do not nest a separate IonRouterOutlet inside a tab page.
  • setupIonicReact errors or components not rendering: Ensure setupIonicReact() is called before ReactDOM.createRoot() or ReactDOM.render() in the entry file. Ensure all Ionic CSS files are imported (see Ionic CSS imports in src/App.tsx or src/main.tsx).
  • IonBackButton not appearing: IonBackButton only renders when there is navigation history. Set the defaultHref prop to provide a fallback route when the page is accessed directly.
  • Form input values not updating: Use onIonInput for IonInput/IonTextarea (not onChange). Use onIonChange for IonSelect, IonToggle, IonCheckbox, IonRange. Access values via e.detail.value.
  • Modal or popover content not styled: Ensure the overlay content is wrapped in IonContent. For modals, include IonHeader with IonToolbar if a toolbar is needed.
  • React strict mode double-mounting: In development, React 18 strict mode mounts components twice. This can cause duplicate Ionic event listeners. Ensure cleanup functions properly remove listeners.
  • useIonRouter returns undefined: The hook must be used inside a component that is a descendant of IonReactRouter. Verify the component tree includes IonReactRouter as an ancestor.
  • CSS custom properties not applying: Ensure Ionic CSS files are imported in the correct order in src/App.tsx or src/main.tsx. The theme variables.css file must be imported after the core Ionic CSS.

Related Skills

  • ionic-app-development — General Ionic development covering components, theming, and CLI usage.
  • ionic-app-creation — Create a new Ionic app from scratch.
  • capacitor-react — Capacitor-specific React patterns for accessing native device features (without Ionic Framework).
  • ionic-app-upgrades — Upgrade Ionic Framework to a newer version.
  • capacitor-plugins — Install, configure, and use Capacitor plugins from official and community sources.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ionic React AI skill do?

Guides the agent through Ionic Framework development with React — project structure, React-specific Ionic components, IonReactRouter and navigation patterns, Ionic lifecycle hooks (useIonViewWillEnter, useIonViewDidEnter, useIonViewWillLeave, useIonViewDidLeave), state management integration, and React-specific best practices for Ionic apps. Do not use for plain Capacitor React apps without Ionic (use capacitor-react), Ionic with Angular or Vue, creating a new Ionic app (use ionic-app-creation), upgrading Ionic to a newer version (use ionic-app-upgrades), or general Ionic component usage wi...

Why use Ionic React on TypingMind?

Because you install it once and use it with any model. Ionic React is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ionic React in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/capawesome-team/skills/tree/main/skills/ionic-react. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ionic React?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ionic React?

As many as you like. As long as a model supports skills, you can use Ionic React with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ionic React AI skill free?

Yes. It is published on GitHub by capawesome-team under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇