
Explore how clicking a button updates a page by managing state with a state setter and a component function, revealing React's strategy of automatic updates.
Explore how react's file structure and updating strategy work, from the root div and createRoot to re-rendering with useState hooks, JSX components, and commit phase.
Create your first React component in a demo project, export it as a pure function, and manage state with useState while avoiding side effects.
Explore how to safely update state with useState, prevent infinite rerenders by wrapping event handlers, observe batching behavior, and use callback setters to derive new state values.
learn how react tracks hook identity by order, why all hooks must be declared at the top level, and how conditional hooks can cause render errors and misassigned state.
Learn how JSX treats HTML tags as data using components, variables, and state to conditionally render image and heading, and manage arrays with unique keys to shape the dom tree.
Create dynamic lists from arrays and objects in a React template by mapping to li elements, using stable keys, and applying inline styles for bold, alternating colors, and count-based highlighting.
Sort a date-based list by updating React state, convert data to a new items array with the spread operator, and wire ascending and descending buttons with disabled states.
Build a dynamic menu from a predefined array where each record becomes a sublist with a title and content, using Object.keys and a per-record open/close state.
Create a React clock that updates every second by placing current time in state, using setTimeout for a one-second gap, and formatting minutes and seconds with leading zeros.
Enhance the stopwatch with a split feature that records split time by subtracting start time from Date.now, stores them in an array, and renders the list via an event handler.
Create a countdown that updates the remaining time every 0.1 seconds using a remain state and duration, handle countdown with setTimeout and setInterval, and clear timers on new countdowns.
Diagnose how timer IDs, setInterval, and clearTimeout control page updates and why the second countdown ends prematurely. Explore closure and how using a local variable fixes timer cancellation across countdowns.
Explore how closures preserve outer scope data through inner functions, reuse local variables like num, and manage timers with setInterval, setTimeout, and clearTimeout in countdown scenarios.
Explore how useMemo and useCallback optimize component performance by memoizing parity calculations and callbacks, controlled by a dependency array to avoid unnecessary re-runs.
Master the useEffect hook by placing the setup function at the top level to manage side effects, like document.title, and using the dependency array and cleanup to prevent race conditions.
Demonstrates using useEffect to sync a component with an external backend via numbers api, using axios to fetch data, manage a waiting notification, and handle dependency-driven updates safely.
Boost React efficiency by using memo, lazy, and suspense to minimize rerenders, load components on demand, and manage prop changes, callbacks, and fallbacks during remote component loading.
Learn to keep the UI responsive during page updates with startTransition and useTransition, show a middle page with a waiting notification, and minimize rerenders by placing transitions in smaller components.
Learn how to manage a number state with use reducer by defining a pure reducer outside the component, dispatching actions like increment, decrement, and reset, and using step for increments.
Explore useReducer by managing a dynamic list: implement delete and add actions via a reducer, dispatch actions with index and text, and clear the input after adding.
Learn to combine useReducer with context by creating items and dispatch contexts, providing them to components, and building a list and add item components that dispatch delete or add actions.
Experiment with a custom hook to animate new list items using a CSS offset class and an animate state, compare useEffect and useLayoutEffect behaviors for reliable fades.
Create and use a custom hook to render a list with a fade-in animation, manage animate state, and support adding items via a reusable add-item function.
Create fade in and fade out animations with a single custom hook named use list that maps items into a list and handles delete and add item actions.
Implement a coordinated fade-out and fade-in of an h1 using React hooks, with onClick logic, progress-based opacity, and requestAnimationFrame, including useEffect and useLayoutEffect for timing.
Reverse a canceled fade-out animation in Nuxt.js by using a shared progress, a 1000 ms duration, and requestAnimationFrame to restore the item’s opacity and position.
Learn how to delete multiple items by resetting the item state with a callback, deriving the new state from the previous one, so each delete updates the list correctly.
Explore how React Router loads components based on path to render page-like views, learn why data mode is recommended, and gain unique perspectives and tricks.
Set up react router in a react project, install react router and axios, define root and gallery routes with create browser router and router provider, and add an error page.
Create a nested child root with a relative path and render it via outlet inside a gallery, then explore layout routes and how a child loads its components.
Explore how dynamic routes in React Router embed parameters in the URL, read them with useParams, validate ids, and switch displayed images using NavLink with an active style.
Learn to embed data in the URL via the query string using useSearchParams, retrieve values with URLSearchParams, and display messages or detailed errors on the error page.
Practice React Router by building a story route with dynamic params, nested routes and outlet, plus a number details component that validates params and offers navigation back.
Fetch data for a dynamic number route with a loader and axios, call the numbers API, return detail, and display it via useLoaderData with a loading fallback.
Fetch data with axios in a React Router flow, using use navigation and try/catch to handle errors, display numbers API text in the action submit component, and show waiting notification.
Learn to use the fetcher action in React Router to submit data without navigation. Stay on form page and manage state to show a waiting notification and the action result.
Learn lazy loading in React Router by loading the fetcher form component and action only when needed, using dynamic imports, async functions, and Promise.all.
Learn the essential react rule: to display something new, set a new state, triggering a re-render that creates new content with jsx and state-driven choices, including conditional rendering between images.
Explore building a React component with JSX, importing React, using hooks like useState, and mastering JSX rules, root elements, fragments, and curly brace expressions.
Discover the true identity of JSX by seeing how Babel converts JSX into React.createElement, with a focus on props, type, key, and the resulting virtual node.
Discover the smart design of the children array and how React differentiates identical elements in the render tree, using createElement, and why the key property becomes essential for unique identification.
Learn to render a dynamic list from an array with stable, unique keys. Convert items to objects with an id, and apply alternating colors using index parity.
Move back to JSX to render a list from the challenge array using map, with item.content and item.id as key, and apply a style prop for alternating colors.
Convert a single record into a list by iterating with a for-in loop, rendering each property name and value in li items with alternating colors and skipping id.
Learn to convert an array of objects into a list of lists using map for per-record sublists, assign unique keys, and apply alternating colors while omitting the id property.
Pin a record by converting its boolean to a string, build a pinned array with forEach and unshift, and lift the pinned item to the top, displaying a pin icon.
Improve the program from the last lesson by replacing map with forEach, lifting the pinned item to the top, removing the pinned property, and using useState for state.
Explain pure functions in React as having no side effects and same output for identical inputs, and show why external mutations violate purity while props and useState drive behavior.
Explore closure in JavaScript by creating an app function with a local num and a child function. Learn how delaying execution with setTimeout or setInterval preserves the function scope.
Explore how closure preserves data for future use by tying a fetch to Numbers API with an abort controller and a 200 millisecond timeout, via setup and cleanup in useEffect.
Learn how to use the useState hook in React by creating a learn-hooks component, declaring a state value and setter, and wiring an event handler to trigger a re-render.
Learn how React batches multiple state updates to avoid extra re-renders, triggering a single re-render after an event handler completes and previewing the useTransition hook for lower-priority updates.
Explore how closure and function scope govern component state, including the initial scope, a delayed event handler, and how stale state can persist and cause memory leaks.
Hoist the event handler above the template and remove setTimeout to verify triggering works. The prep area derives new values from current state and computes parity, avoiding state changes there.
Use the useMemo hook to memorize the parity of count across renders, reusing the value until count changes. Specify a dependency array to re-evaluate the memoized parity whenever count updates.
Learn how React differentiates useState hooks by order and why declaring hooks at the top level matters. Avoid conditional hooks to prevent swapped state values.
Teach how to implement a one-at-a-time pin feature using useImmer, converting the challenge array to state, adding pin and unpin controls, and triggering re-renders.
Explores building an interactive multi-menu UI with JSX, map over data, for-in content, open/close controls, and state strategies (useState and useImmer) to improve rendering via child components.
Master suspense and lazy loading by conditionally rendering a child component with a boolean state, using React lazy and suspense to load on demand.
Create independent menu components with their own state to prevent rerendering. Render menus with map and pass title and content as props, starting with the first menu open.
Explore how to build and render a dynamic list of ten child components, control rendering with a boolean state, and observe React's render order to understand why transitions are needed.
Discover how start transition defers state updates to render non-blocking transitions, enabling interruption and cancellation while ensuring restarts use the latest values to prevent race conditions.
Explore useReducer by consolidating state updates in a reducer, triggered with dispatch and an action object; learn the reducer function, updater function pattern, and cases like increment, decrement, reset, rotate.
Build a to-do list with add, edit, and delete using a dedicated item component and local edit mode, preparing to switch to a reducer in the next lesson.
Explore a reducer-based to-do list: manage state with a reducer, handle add, delete, and edit actions, enforce input validation, and update items by id via dispatch.
Discover how the useEffect hook automatically runs a setup function, re-executed when count changes via the dependency array, and cleans up with a closure-based cleanup function.
Master the safety of useEffect by avoiding infinite loops: never reset a state in the setup function if it’s in the dependency array, and vice versa.
Use useEffect to retrieve remote data with axios from a dummy JSON API, replace fetch with the axios get method, then setTodo with the response and manage id driven loading.
Study how race conditions occur when rapid requests collide and prevent them by canceling ongoing requests with an abort controller and a cleanup function, illustrating closure preservation.
Learn to build and reuse a custom hook that manages first and last name state, exposes handlers, and returns values for spreading into components for reusable, scalable form logic.
Create a list app that adds items via input and a button, then animates new items with a fade-in entry using an offset class and useEffect, while exploring useLayoutEffect.
Recreate a fade-in animation with a custom hook that manages list state and a reset effect, returning the list and its setter.
Learn to implement a fade-out exit animation for list items by wiring a delete button, delaying removal with a timeout, and refactoring with a custom hook.
Learn to build a dynamic list with entry and exit animations via a custom hook use list, managing add and delete with state and effects.
Build a clock that updates every second by storing the current time in state. Use setTimeout to create a one-second gap and encapsulate the logic in a useClock custom hook.
In this lesson, we will show you how to use Vue CLI 3.
In this lesson, we will analyze the file structure of the Vue app created by Vue CLI 3.
Analysis of the APP we are about to create.
Install and configure the iview UI library via npm in main.js, importing iview and iview.css. Create three pages—introduction, spec, history—that share a gallery component and adjust router and navbar.
Create and connect the gallery, introduction, history, and spec pages, display brand and model from store state via the eye view card, and iterate the spec with v-for and keys.
Summary of the app we just created.
In this lesson, we will show you how to set up a new Nuxt program. We will show you two options: starter template and the new Nuxt scaffolding tool.
You will also learn how to use the dev server, production server and output program as static files.
In this lesson, we will show you how nuxt generates its homepage. You will learn the working mechanism of nuxt. At the end of this lesson, we will do a comparison between nuxt and the vue program we created using vue cli 3. So if you skipped the Vue section, make sure you watch it before starting this lesson.
In this lesson, we will show you how to create a universal header and footer. Every page will automatically inherit them. Watch this lesson to find out how.
Nuxt offers us a default error page. In this lesson, we will show you how to create our own error page.
There will be a conflict between the default layout file and the error layout file. Watch this lesson to find out how to solve this problem.
In this lesson, we will create a custom layout for our normal pages by applying what we have learned in the previous lessons.
Create and integrate header, main, and footer components into the layout, resolve reserved name conflicts by capitalization, and add a navigation bar with links and hover styles.
Create a gallery component in a Nuxt.js page by moving images to assets, displaying brand and model with an image tag, and set 15px left and right padding in Mainview.
In this lesson, we will show you how to create and register universal CSS.
We will use fontawesome as the icon library. But we want to install fontawesome via CDN. Watch this lesson to find out how.
In this lesson, we will show you the difference between static and assets.
In this lesson, we will show you how to install a UI library. We will use bootstrap as example. We will show you two installation methods.
At this moment, our Nuxt program has three pages: the homepage, the resource page and the UI page.
All these three pages have the same title. This is because they all inherit the same head setting from the nuxt config file.
In this lesson, we will show you how to set custom head info for each page.
In this lesson, we will show you how to use VueX in Nuxt.
In this lesson, we will show you how to set mutation methods and reset state properties.
Practice using vuex by creating a store file index.js with a state function, then define getters to capitalize the brand and access them in the gallery component.
Starting from this lesson, we will show you how to use Nuxt router.
Nested route enables us to create one page using two page files. Watch this lesson to find out how.
In this lesson, we will show you how to set and style the nuxt-link tag.
In this lesson, we will show you how to keep the active nuxt-link tag highlighted.
In this lesson, we will show you how to create a transition effect when switching pages. We will also show you how to use animate.css.
In this lesson, we will show you how to create dynamic routes and pass data using params.
In this lesson, we will still show you how to create dynamic routes. But this time, we will do it using directories.
In our previous lessons, we have learned nested routes and dynamic routes. In this lesson, we will combine them together and learn how to use dynamic nested routes.
Data passed via URL can be reset by anybody. Therefore, it is very important we check them before use. The validate method is what Nuxt offers us to check data passed by URL.
Learn to implement nested routes in Nuxt.js by converting the index into a parent page, sharing the upper layout, and creating three child pages for spec, history, and introduction.
The download link:
https://drive.google.com/file/d/1fBJAW3nx6I8Rt_TEvukTBgkux8FVL7gx/view?usp=sharing
Create a home page listing all cars with links to each introduction page via the car index, and implement a shared parent validate method to verify id values.
Starting from this lesson, we will enter a new era of our nuxt study: the CONTEXT era. You can think of context as the nuxt equivalency of Vue this, only more powerful.
Context gives us access to every corner of the Nuxt program, including Nuxt router, VueX, Nuxt modules, etc.
In this lesson, we will show you how to create and register middlewares. You will also learn a few quirks and features of middlewares.
In this lesson, we will show you how to operate Nuxt router using context in middleware.
In this lesson, we will show you how to operate VueX using context in middleware.
Note: We have added EXTRA React, Vue 3, and MongoDB courses.
As an enhanced version of Vue, Nuxt has more functionalities and is also easier to configure. With Nuxt, you can code less but do more.
You don’t have to be a Vue expert to study Nuxt. Just basic Vue knowledge is enough.
In the first section, we will create a Vue app using Vue CLI 3.
The file structure created by Vue CLI 3 is very similar to the one used in Nuxt. They even have the same mechanism of generating pages.
We will recreate the same app using Nuxt and show you the similarities between Vue and Nuxt.
Your previous Vue knowledge can help you quickly understand the working mechanism of Nuxt. Once you have understood how Nuxt works, you can master it in no time.
Our official Nuxt study includes five sections.
1. Nuxt basics
2. Nuxt plugins and modules
3. Nuxt routing system
4. Nuxt context
5. Data exchange with the backend program (Express.js)
At the end of each section, there will be an infographic article to help you review everything you just learned.
Each review is followed by a practice session where you will practice and apply everything you have learned by creating a real app. You will also learn many new skills in this process, including how to handle cookies and create a membership system.