For the complete documentation index, see llms.txt. This page is also available as Markdown.

React

Deploy React apps as static Vite builds on Hostinger, with package.json scripts, hPanel build settings, and SSR alternatives like Next.js and Astro.

Component library for building user interfaces. Hostinger runs React apps as static bundles built with Vite.

app_type: react

Note: Create React App (CRA) was archived by Meta in early 2024 and is no longer supported. Migrate to Vite or use Next.js/Remix for full-stack.

Static mode

React on Hostinger is always static — Vite builds your app to a directory of files that's served directly.

package.json

{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "devDependencies": {
    "vite": "^5.0.0",
    "@vitejs/plugin-react": "^4.0.0"
  }
}

vite.config.js

hPanel settings

Field
Value

Application type

react

Build script

build

Output directory

dist

Entry file

— (static)

Server mode

React itself doesn't ship a server runtime. For SSR, use one of:

  • Next.js — recommended for SSR and full-stack React

  • Astro — content-first sites with React components

Notes

  • Scaffold a new project: npm create vite@latest my-app -- --template react

  • For TypeScript: --template react-ts

  • For routing, use React Router or Tanstack Router (both work unchanged on Hostinger since routing is client-side).


Last updated: July 21, 2026

Last updated

Was this helpful?