De hoofdinhoud van deze pagina is in het Engels.Deze pagina vertalen
Vaardigheden & technologieën
React roadmap
Learn React with TypeScript: components, state, hooks, data fetching, routing and a full-stack framework.
- Tijd
- ⏱ 4–6 weeks
- Level
- Intermediate
- Steps
- 5 steps
- Progress
- 0/5 done
The roadmap
Click a step to open the full guide.
Best architecture: a React application with a framework
How modern React apps split work between server and browser.
Server vs client
Server
- Routing & layouts
- Data fetching (server components)
- Mutations (server actions)
- Static pages at build time
Client
- Interactive components
- Local UI state
- Optimistic updates
- Client-side caching
Why it's built this way
- Default to server components; use client components only for interactivity.
- Keep secrets and data access on the server.
- Feature folders + a shared design system.
React cheat sheet
The essentials on one screen. Bookmark it for revision.
Hooks
useState | Local state: const [v, setV] = useState(0) |
|---|---|
useEffect | Sync with outside systems after render |
useMemo | Cache an expensive computed value |
useCallback | Keep the same function between renders |
useRef | Mutable value / DOM node that doesn't re-render |
useContext | Read shared data from a provider |
Patterns
| List | items.map(i => <Row key={i.id} {...i} />) |
|---|---|
| Conditional | {isOpen && <Modal />} |
| Controlled input | <input value={v} onChange={e => setV(e.target.value)} /> |
| Update array | setItems(prev => [...prev, item]) |
| Update object | setUser(u => ({ ...u, name })) |
Improve performance
- Send less JavaScript: render on the server where possible and lazy-load heavy components.
- Keep state close to where it's used to avoid re-rendering big trees.
- Use
useMemo/React.memoonly for measured slow spots. - Virtualise very long lists (render only visible rows).
- Optimise images (correct size, modern formats, lazy loading).
- Measure with React DevTools Profiler and Lighthouse before optimising.
Security checklist
- React escapes text by default; avoid
dangerouslySetInnerHTMLunless sanitised. - Never put secrets in client code; anything in the bundle is public.
- Validate and authorise on the server, not just in the UI.
- Use HttpOnly cookies for sessions and protect forms against CSRF.
- Keep dependencies updated and audited.
Most important interview questions
Click a question to see a strong answer. Each step also has its own questions.
1Wat is the virtual DOM?
A lightweight description of the UI that React compares between renders to apply the minimum real DOM changes.
2What causes a component to re-render?
Its state changes, its parent re-renders, or a context it uses changes.
3Controlled vs uncontrolled components?
Controlled inputs get their value from React state; uncontrolled inputs keep their own value in the DOM, read via refs or form data.
4How do you optimise a slow React app?
Profile first; then reduce unnecessary renders (state placement, memo), split code, virtualise long lists, and move work to the server.
5What are React Server Components?
Components that run only on the server, can access data directly and send rendered output without their JavaScript, reducing bundle size.