> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/node.js/overview-1/react.md).

# React

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`

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

### `vite.config.js`

```js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
});
```

### 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](/node.js/overview-1/next.md) — recommended for SSR and full-stack React
* [Astro](/node.js/overview-1/astro.md) — 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*
