# React Fundamentals

> Think in components: JSX, props, rendering lists, conditional UI and composing small pieces into full pages. Free notes, key concepts, resources and a mini...

Canonical: https://www.internhack.in/roadmaps/tracks/full-stack/react-fundamentals
Last updated: 2026-11-28

Think in components: JSX, props, rendering lists, conditional UI and composing small pieces into full pages.

Intermediate · about 10 hours · difficulty 2/5

Learn first: [TypeScript Fundamentals](https://www.internhack.in/roadmaps/tracks/full-stack/typescript), [Flexbox, Grid and Responsive Design](https://www.internhack.in/roadmaps/tracks/full-stack/responsive-layout)

React describes the UI as a function of data. You change the data; React updates the screen. Next.js, which you will learn next, is built on these same ideas.

### Components and JSX

A component is a function that returns JSX. JSX looks like HTML but is JavaScript: use className instead of class, wrap expressions in curly braces, and return a single root element (or a fragment).

### Props

Props pass data down from parent to child. Treat them as read-only. Use **children** to build layout components like Card or Modal that wrap other content.

### Rendering lists and conditions

- map over arrays to render lists, and give every item a stable **key** (an id, not the array index when items can reorder).
- Use && or a ternary for conditional UI, and early returns for loading and error states.

### Thinking in React

Break a design into a component tree, decide which component owns each piece of data, and pass it down. Keep components small and focused; if a file is 400 lines, split it.

### Pitfalls

- Using array index as key in lists that can be sorted or filtered.
- Copying props into state, which then goes stale.
- One giant App component that does everything.

You are ready to move on when you can turn a static mockup of an internship board into a component tree with typed props and render it from an array of data.

## Key concepts

- **Components and JSX**
- **Props and children**
- **Rendering lists with keys**
- **Conditional rendering**
- **Component composition**
- **Thinking in React**
- **React DevTools**

## Mini project

Build a Vite + React + TypeScript internship board from a local JSON array: a list of cards, a details panel, and empty, loading and error states, split into at least six components.

## Check yourself

Why does React need a key on list items, and what goes wrong if you use the array index on a sortable list?

## Free resources

- [Learn React](https://react.dev/learn) (React)
- [Thinking in React](https://react.dev/learn/thinking-in-react) (React)
- [React Roadmap](https://roadmap.sh/react) (roadmap.sh)

Previous: [Runtime Validation with Zod](https://www.internhack.in/roadmaps/tracks/full-stack/runtime-validation) · Next: [State, Effects and Hooks](https://www.internhack.in/roadmaps/tracks/full-stack/react-hooks-and-state)

## More in React for Interfaces

- [React Fundamentals](https://www.internhack.in/roadmaps/tracks/full-stack/react-fundamentals)
- [State, Effects and Hooks](https://www.internhack.in/roadmaps/tracks/full-stack/react-hooks-and-state)
- [Forms and User Input](https://www.internhack.in/roadmaps/tracks/full-stack/forms)
- [Styling with Tailwind CSS](https://www.internhack.in/roadmaps/tracks/full-stack/tailwind-css)
- [Styling with CSS Modules](https://www.internhack.in/roadmaps/tracks/full-stack/css-modules)
- [Server State with TanStack Query](https://www.internhack.in/roadmaps/tracks/full-stack/server-state-tanstack-query)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Full-Stack Developer Roadmap](https://www.internhack.in/roadmaps/tracks/full-stack)
