What is CRA and its benefits?
Assesses fundamental understanding of React conventions, runtime behavior, and memory/performance considerations.
Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.
⚠️ OUTDATED: Create React App (CRA) is no longer actively maintained and is not recommended for new projects as of 2024+.
Modern Alternatives: Use Vite (for SPAs) or Next.js (for full-stack/SSR) instead. See recommended setup commands at the end of this answer.
---
Historical Context:
The create-react-app CLI tool allows you to quickly create & run React applications with no configuration step.
Let's create Todo App using _CRA_:
# Installation
$ npm install -g create-react-app
# Create new project
$ create-react-app todo-app
$ cd todo-app
# Build, test and run
$ npm run build
$ npm run test
$ npm start
It includes everything we need to build a React app:
- React, JSX, ES6, and Flow syntax support.
- Language extras beyond ES6 like the object spread operator.
- Autoprefixed CSS, so you don’t need -webkit- or other prefixes.
- A fast interactive unit test runner with built-in support for coverage reporting.
- A live development server that warns about common mistakes.
- A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.
---
Modern Alternatives (Recommended 2026):
1. Vite (Best for SPAs):
npm create vite@latest my-app -- --template react
cd my-app
npm install
npm run dev
- Lightning-fast HMR (Hot Module Replacement)
- Modern ESM-based development
- Optimized production builds with Rollup
2. Next.js (Best for full-stack/SSR):
npx create-next-app@latest my-app
cd my-app
npm run dev
- Server-side rendering and App Router
- Server Components and Server Actions
- Built-in routing, API routes, and optimizations
3. Remix (Alternative for full-stack):
- Web fundamentals-first approach
- Excellent performance and DX
- Progressive enhancement
Candidate Response Strategy & Interview Tips
- Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
- Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
- Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
- Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.