
You will set up your first React project; more importantly, you will understand how React updates page elements: it only updates outdated elements and will reuse the remaining ones.
You will understand the file hierarchy of React. More importantly, you will learn the three genius designs React uses:
Calling a component function as a tag so that it can simulate real HTML tags using built-in components;
The useState hook returns an array so that every state value comes with a dedicated state setter;
The order in which useState is called decides the identity of the state value it creates.
This lesson is particularly important!
The "prep" area refers to the area below the useState hook and above the template. This is where you intercept the state value and further process it to create new values that better meet your demands. These new values are created right before the template is returned, so they can still be displayed on the new page.
The state setter supports multiple types of syntaxes. Meanwhile, there are some edgy situations involving setting new state values.
You must truly understand React to be able to create an error it cannot detect. In this lesson, your understanding of React will be put to test.
React has simulated all HTML tags using built-in components, and its template is made of such components. In other words, React has replaced real HTML tags with component functions. This enables us to control page elements like we never could before!
How to create a list?
Iterate over an array/object and wrap every element/property with an "LI" tag.
A NoSQL query returns an array of irregular objects. In this lesson, you will learn how to convert such an array into a list.
The Golden React Rule: To display something new, set a new state value first!
If the new state value is not ideal, intercept it in the "prep area" and further process it!
Pin a list item to the top of the list.
Move a list item up or down the list.
Create a complicated list to challenge yourself.
To be able to fit recursion into the framework of React, you must truly understand Recursion first!
Create an infinite list using recursion.
Challenge: Open and close any sublist.
Hint: To display something new, set a new state value first! Opening or closing a sublist is displaying something new.
Extra challenge: check if all sublists are open or closed. This requires you to create a different type of recursion.
Create a digit clock that updates every second.
Create a stopwatch.
Extra challenge: create a list "dynamically."
Closure preserves data for later use.
You will learn two new hooks and a new concept - the dependency array.
The Coconut Theory: If you have seen the problem, the solution to that problem can be difficult to understand.
Retrieve remote data and present them to users as soon as possible.
Returning an inner function is a popular technique that's used by almost all frameworks.
The inner function creates a closure that preserves data for later use. The inner function itself provides us space to write codes. Meanwhile, the inner function can be easily programmed to be executed at the right time.
Send multiple requests together.
This is a good and effective course that can help you master React, and I can prove this:
Proof of quality:
You will understand React so well that you will know how to "fool" it by creating an error it cannot detect! Meanwhile, you will also be given a series of well-designed practices and challenges to practice and examine what you have learned.
12 learning objectives:
This course comes with 12 learning objectives. Every learning objective is specific and measurable so that you can assess your learning outcomes on the spot. More importantly, all the learning objectives are within easy reach.
You will:
Be able to fool React by creating an error React cannot detect.
Create a list for the query result of a NoSQL database, which is an array of an unknown number of irregular objects.
Control list items in four ways: sorting the entire list, pinning an item to the top, changing item positions, and opening and closing sublists.
Create a list with an infinite number of sublists, where each sublist can be opened and closed independently.
Create 3 React gadgets to make you "smarter": clock, stopwatch, and countdown.
Send a request to the backend API and display the response, including the waiting notice and error warning.
Fix the problem of “race condition/hazard” using closure.
Operate nested components, including data exchange (props), efficiency (memo, lazy), user experience (transition), and convenience (context).
Use Reducer to keep your components simple.
Use Custom Hooks to better arrange and reuse your code.
Create entry and exit animations for list items.
The React Router
Bonus Section: The fun and creative application of "reducer."
Within easy reach:
The goal is to keep this course short so that you can finish it quickly and see results sooner. This means every second is precious, so I have to make the most out of every second and only show you the most useful.
Be considerate:
All demo codes are properly formatted so that related codes can be displayed on a single screen. You can pause the video when needed and analyze the codes at your own pace.
Keep it light:
You will always be able to follow the course and make continuous progress. Here are the specific measures to keep this promise:
Introduce the new using the familiar, as you will see in lesson one.
Learn the new by reusing and expanding the old.
Learn the basics first and dig deeper later in the following practice/application session.
Four original ideas:
This course comes with four original ideas, two general and two React-specific.
The Coconut Theory: If you haven't seen the problem, the solution to that problem can be difficult to understand. This is what makes coding difficult, especially for beginners. The solution is to focus on three basic factors: does it provide you space to write codes, does it give you access to needed resources, and does it execute your codes automatically at the right time? Believe it or not, all frameworks are designed to serve these three purposes. (See more details in Lesson 23.)
The Antonym Method: If you don't know how to solve a problem, try describing the problem using different words, especially antonyms. Doing so instantly gives you a different perspective, which helps you solve the problem. (See applications in Lesson 11 & 20.)
The "Prep Area": I refer to the area below the "useState" hook and above the template as the "Prep Area." This is where we intercept state values and further process them, creating new values that better meet our demands. (See more details in Lesson 3.)
The Golden React Rule: To display something new, set a new state value! This rule gives you a clear instruction, enabling you to take the first step in the right direction right away! (See more details in Lesson 9.)