Skip to content

sophiabrandt/outside-in-vite-react

Repository files navigation

outside-in-vite-react

outside-in-vite-react is a sample project for experimenting with vitest and playwright.

Note: this project is from the book Outside-In React Development with some replacements made by me:

  • TypeScript
  • vite & vitest
  • Playwright instead of Cypress
  • MobX instead of Redux
  • plain fetch instead of axios
  • uncontrolled form components
  • React Suspense with custom createResource for data fetching

Installation

Install dependencies:

bun install

You will need an API key for the backend server. Check https://api.outsidein.dev/ for further information.

Create a new file called .env.local and add the key:

VITE_API_KEY=

Usage

bun start

Tests

bun run test
bun run test:e2e # before the first run you will need to do: `bunx playwright install`