Skip to content
Projects

ionic-team/tutorial-photo-gallery-react

View on GitHub

ionic-team/tutorial-photo-gallery-react has 93 GitHub stars and 86 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 19:34 UTC. Last push 2026-11-09.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Update delayed
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Photo Gallery Tutorial: Ionic React and Capacitor

Web & Apps

README.md

Original

Build Your First Ionic App: Photo Gallery (Ionic React and Capacitor)

Get started with Ionic by building a photo gallery app that runs on iOS, Android, and the web - with just one codebase. This is the complete project referenced in the "Your First App: React" guide. Follow along to create a complete CRUD (create-read-update-delete) experience.

Powered by Ionic React (web app) and Capacitor (native app runtime).

How It Works

After the user navigates to Tab 2 (Photos), they can tap/click on the camera button to open up the device's camera. After taking or selecting a photo, it's stored permanently into the device's filesystem. When the user reopens the app at a later time, the photo images are loaded from the filesystem and displayed again in the gallery. The user can tap on a photo to be presented with the option to remove the photo.

Feature Overview

Project Structure

  • Tab2 (Photos) (src/pages/Tab2.tsx): Photo Gallery UI and basic logic.
  • usePhotoGallery Hook (src/hooks/usePhotoGallery.ts): Logic encapsulating Capacitor APIs, including Camera, Filesystem, and Preferences.

How to Run

[!TIP] It's highly recommended to follow along with the tutorial guide, which goes into more depth, but this is the fastest way to run the app.

[!IMPORTANT] Requires Node ^22.12.0 || >=24.0.0. Node 23 is not supported.

  1. Install the Ionic CLI (if you haven't already): npm install -g @ionic/cli
  2. Clone the repository: git clone https://github.com/ionic-team/tutorial-photo-gallery-react
  3. Navigate to the project directory: cd tutorial-photo-gallery-react
  4. Install the project dependencies: npm install
  5. Run the app in your browser: ionic serve
  6. Run the app on iOS or Android: Follow the Capacitor Workflow guide for instructions on building and running the app on a native platform.

Linting

The code is checked with ESLint and formatted with Prettier, using Ionic's shared configs. npm run lint also type-checks the Playwright tests, which ESLint and Playwright don't do on their own. Pull requests must pass npm run lint.

  • Check for issues: npm run lint
  • Fix what can be fixed automatically: npm run lint:fix

Testing

  • Run the unit tests (Vitest): npm run test:unit (or npm run test:unit:watch to rerun on changes)
  • Run the end-to-end tests (Playwright): npm run test:e2e. The first time, install the browser with npx playwright install chromium.
  • Run both: npm test