Video summary
React JS c Нуля – ПОЛНЫЙ Курс для начинающих (2025)
Main summary
Key takeaways
Main ideas, concepts, and lessons
Why React exists / what React is
- React is presented as a JavaScript library for building user interfaces (web, and also via React Native for native-style mobile development).
- Its key value is simplifying UI development by working with components—described as building blocks.
Course approach / teaching methodology (Resul University)
- Learn the theory in short micro-videos, then spend most time on practice.
- Instruction emphasizes experienced mentors (mid / “middle+” specialists) who guide you until you achieve results.
- The video includes links to roadmaps and learning/tasks aligned with real workplace expectations.
React vs “pure JavaScript” (imperative vs declarative)
- Pure JS (imperative) example:
- Uses sequential DOM-like steps: handle clicks, update classes manually, and rerender parts via imperative logic.
- React (declarative/reactive) example:
- You define the UI based on state (“what should be active”).
- When state changes, React automatically redraws the interface.
How to start a React project
- Easiest online method: React Sandbox
- Local development:
- Use an editor like VS Code (or WebStorm).
- Install Node.js and verify with
npm -v. - Create a project with Create React App:
npx create-react-app my-app
- The course also demonstrates a Vite/TypeScript-like flow and local server (e.g.,
localhost:5173).
JSX compilation detail
- React uses JSX, which browsers can’t directly understand.
- Tooling transpiles/compiles JSX into browser-understandable JavaScript.
React components: building blocks
- A React UI is decomposed into small components (e.g., header, button, list items).
- Benefits:
- Reuse across the app
- Easier navigation and maintenance
- Reduced errors, faster iteration
- Component-local grouping of HTML/CSS/JS logic
JSX fundamentals
- JSX resembles HTML tags, but it’s actually JS syntax plus XML-like markup.
- Dynamic values are inserted via curly braces:
{...}. - JSX supports:
- rendering expressions
- conditional rendering
- passing props/attributes
- Conditional logic patterns taught repeatedly:
- ternary operators
- short-circuit rendering
Props and data-driven components
- Components accept props (parameters) from parents.
- Props enable reusable generic components (e.g., one “card/list item” component used for many items).
- Arrays are mapped into components:
array.map(item => <Component ... />)
- React requires a unique
keyfor each list element.
State and reactivity
- React is “reactive”: it rerenders when state changes.
- Hooks used:
useStatefor local component state- update state via setter functions (e.g.,
setContent(...))
- Common beginner pitfall:
- logging the value right after
setStatemay show the previous state, because updates apply on the next render cycle.
- logging the value right after
- State-driven UI features shown:
- tab-like switching
- conditional content display
- active button highlighting using
classNamederived from state
Conditional rendering patterns taught
- Ternary:
condition ? <A/> : <B/> - If not / short-circuit:
{condition && <Component/>}{!condition ? <A/> : null}style
- Also includes using variables to hold JSX blocks and render conditionally.
Refactoring / architecture
- Demonstrates moving large sections out of
Appinto:- separate files/components in a
components/folder
- separate files/components in a
- Introduces components like:
Header,Button,Teachings/Differences/Section
- Goal: improve readability and maintainability.
Fragments and root element rule
- JSX components must return one root element.
- Two approaches shown:
- use a wrapper element (
div) - use a Fragment (
<></>orFragment) to avoid adding extra DOM nodes
- use a wrapper element (
React “event handling” with props
- Custom
Buttoncomponent supports clicks viaonClick. - Parent passes the handler down as a prop.
- Examples include passing identifiers (e.g.,
type) to decide which tab/content should change.
useEffect for side effects
Multiple useEffect use cases:
- Correct modal opening using effect dependencies
- Intervals/timers cleanup to avoid memory leaks
- Fetching data from a server asynchronously
- use state for
loadingandusers - avoid infinite rerenders with correct dependency arrays
- use state for
Important rule:
- When using timers/listeners, return a cleanup function from
useEffect.
Fetching data from server
- Example flow:
- fetch a list of users from an external API
- store results in
usersstate - render via
.map(...)
- Warning:
- placing async requests inside the render body can trigger repeated requests / render loops
Custom hooks
- Demonstrates building a hook like
useInput():- encapsulates
useStatefor input value - returns an API like
{ value, onChange }
- encapsulates
- Used for dynamic filtering (filtering user lists based on input text).
Styling approaches taught
- Baseline: global CSS imports (e.g.,
index.css) - Component-scoped styling:
- CSS Modules (
className={styles.someClass}) - libraries like “sty” for CSS-in-JS-like scoped styling
- CSS Modules (
- Important naming detail:
- JSX uses
className, notclass
- JSX uses
Forms and input handling
- Controlled inputs:
- store form values in state
- bind with
value={...} - update via
onChange={...}
- Validations:
- conditional error flags (e.g.,
hasError) - conditional style changes (e.g., red border)
- disable submit when invalid:
disabled={hasError}
- conditional error flags (e.g.,
- Core principle:
- state must be updated via setter functions
- state changes drive UI updates
State update correctness: previous state pattern
- Another pitfall:
- toggling state twice quickly can yield unexpected results due to batched/async updates
- Best practice:
- use the updater function form:
setState(prev => !prev)setX(prev => ...)
- use the updater function form:
Optimizing state shape
- Demonstrates merging multiple
useStatecalls into a single object state to reduce fragmentation. - Updates rely on immutability:
- spread and careful merging.
Two-way binding / useRef
- Introduces two-way binding (template linked with state).
useRefdiscussion:- updating a ref does not cause rerenders
- used for mutable values that persist between renders
Modal component + portal
- Modal is created with a dialog-like component (
<Dialog ...>). - Rendering is moved above the main DOM tree using React Portal:
createPortal(content, document.getElementById('modal-root'))
- Backdrop/darkening is used when the modal is open.
Routing concept (simplified without full router)
- Instead of a full router, the course demonstrates tab/page switching:
- state holds the current “page”
- conditional rendering shows either page A or page B
- Notes “smart vs dumb” component approach:
- stateful parent/page components vs presentational components without internal state
Methodology / instruction-style content (detailed bullets)
Building a minimal interactive UI with React (as demonstrated)
- Setup
- Create a React project (online sandbox or local tooling).
- Start the dev server (
localhost:3000for CRA;localhost:5173for Vite-like setup).
- Create base UI
- Use a root
Appcomponent. - Return JSX markup from components.
- Use a root
- Make UI data-driven
- Create a component (e.g., list item).
- Pass data via props.
- Make it interactive
- Add state with
useState(in the parent or in the component that owns the logic). - On user action (click):
- call a handler (e.g.,
handleClick(type)) - update state via
setState(...)
- call a handler (e.g.,
- React rerenders automatically based on updated state.
- Add state with
Render lists correctly
- Use
array.map()to generate repeated elements. - For every list child:
- provide a unique
key(e.g.,key={item.id}orkey={item.title})
- provide a unique
- Update the UI by changing underlying state/arrays.
Conditional rendering
- JSX patterns:
- Ternary:
condition ? <A/> : <B/> - Short-circuit:
condition && <Component/>
- Ternary:
- Include a fallback (e.g., default text when state is null/empty).
Modals with portal and effects
- Create a modal component that accepts:
open(boolean) andchildren
- Render the modal via
createPortal(...)into a top-level DOM node (e.g.,modal-root). - Use
useEffectwhen the modal must react after mount:- include
openin the dependency array
- include
- Add backdrop styling when
openis true.
useEffect usage guidelines taught
- Intervals/timers
- Create interval inside
useEffect - Provide cleanup to clear interval on unmount or dependency change
- Create interval inside
- Data fetching
- Put async request logic inside
useEffect - Use
[]when requesting once on mount - Maintain states:
loading/ statusdata(e.g.,users)
- Avoid infinite rerenders via correct dependencies and fetch function placement
- Put async request logic inside
Controlled forms
- Create state per field:
const [name, setName] = useState("")const [reason, setReason] = useState("help")
- Bind inputs:
value={name}onChange={(e) => setName(e.target.value)}
- Validation:
- compute error state (e.g., based on
name.length === 0) - apply red border / error styles
- disable submit:
disabled={hasError}
- compute error state (e.g., based on
Custom hook (useInput) pattern
- Implement a function starting with
use:function useInput(defaultValue = "") { ... }
- Inside:
- use
useStatefor the value - provide an
onChangehandler
- use
- Return:
{ value, onChange }
- Use the hook to simplify repeated input logic and enable filtering
Speakers / sources featured
Speaker
- Vladislav Minin (host/instructor; mentions 11 years of JavaScript teaching and founder of “Result University”)
Sources mentioned (not necessarily shown directly as speakers)
- React official documentation (React docs)
- MDN documentation (referenced for
Dialog/ methods) - React Sandbox (online editor)
- Create React App tooling (named and demonstrated)
- External data example: JSONPlaceholder (for user fetching)
- UI placeholder/example mentioned: Yandex Music
- Other libraries/frameworks mentioned: Angular, Vue, Solid, React Native, TypeScript, npm, Vite, CSS Modules, Portal,
sty, etc.