Most React apps today are built with Vite into a folder of static files: one index.html and the JavaScript that draws every page. Lobsite hosts that folder. Run npm run build, then npx lobsite, and the app is live at a *.lobsite.app address with HTTPS. React Router deep links work once single-page mode is on.
How it works
- Build the app with
npm run build. A Vite project writesdist/; an older Create React App project writesbuild/. - Run
npx lobsitein the project. It finds the build folder and deploys it. The first deploy needs no account and lasts 6 hours. - Turn on single-page mode for React Router:
spa = trueinlobsite.toml, or Single-page app in the site's settings. Keep the site with the claim link, in a free account.
React Router and deep links
With createBrowserRouter or <BrowserRouter>, addresses look like /orders/42. Clicking a link works anywhere, because React Router changes the page in the browser. Opening that address directly, or reloading it, asks the server for /orders/42, which isn't a file. Single-page mode answers it with your index.html, and React Router draws the right page.
<HashRouter>(addresses like/#/orders/42) works without single-page mode, since the server only ever sees/. Browser routes look better and are what search engines expect.- React Router's framework mode with
ssr: falsebuilds a single-page app too. Withprerenderset, the listed pages are written as their own HTML files, and single-page mode covers the rest. - TanStack Router and wouter work the same way as React Router.
The deploy shows a tip when it finds a router in package.json and single-page mode is off.
Coming from Create React App
The React team deprecated Create React App in February 2025 and recommends a framework or Vite for new apps. A CRA project still deploys: npx lobsite finds build/, and skips public/, which CRA copies into the build. Moving to Vite changes a few things on the hosting side:
- the build folder becomes
dist/, which is found the same way; REACT_APP_environment variables becomeVITE_ones, read withimport.meta.env;index.htmlmoves frompublic/to the project's top folder.
If the app needs server rendering, look at Next.js with a static export instead, or a host that runs React on a server.
spa = true in lobsite.toml, or one switch in the dashboard: deep links open your app, missing files still 404.
Files are stored by their hash. Redeploying an unchanged site uploads 0 bytes.
Preview before going live. Roll back in one click, redirects and all.
Every site gets a *.lobsite.app address with HTTPS from the first deploy.
Point a form at /_lobsite/forms/contact. Spam filtering included.
A deploy without an account is live for 6 hours. The claim link keeps it, free.
React hosts compared
| Lobsite | Netlify | Vercel | GitHub Pages | |
|---|---|---|---|---|
| React Router deep links | spa = true, or a switch in the dashboard |
A _redirects rule |
A rewrite in vercel.json |
No: HashRouter, or 404.html served with status 404 |
| Missing script files after a deploy | 404, a clear error | The app's index.html |
The app's index.html |
404 |
| Server rendering | No | Yes, with a framework | Yes, with a framework | No |
| Account before the first deploy | No: live 6 hours, then keep it free | Yes | Yes | Yes, and a repository |
| Forms without a backend | Yes, once the site is in an account | Yes | No | No |
| Custom domain | Yes, free | Yes | Yes | Yes |
For a React app that runs in the browser, which is what Vite builds, Lobsite deploys it with one command, uploads only the chunks that changed, and keeps a preview URL for every deploy.
Frequently asked questions
Why does refreshing a React Router page show "Not found"?
The address only exists inside the app, so the server has no file for it. Turn on single-page mode with spa = true in lobsite.toml, or Single-page app in the site's settings.
Can I host a Create React App project here?
Yes. Run npm run build and npx lobsite; the build/ folder is found and deployed. Turn on single-page mode if it uses React Router with browser routes.
Can a React form send submissions without a backend?
Yes, if the form is in the built HTML, for example in index.html, and posts to /_lobsite/forms/contact. A form that only React draws isn't found at deploy time, and its submissions are refused. The forms docs explain how to keep the form in the HTML and send it with fetch().
Do I need Next.js to host a React app?
No. A React app built with Vite is plain files and runs on any static host. Next.js is for server rendering or prerendered pages, and has a static export of its own.