쉐도잉 연습: 71k - 영상으로 영어 말하기 배우기

로딩 중...
1
React is a JavaScript library full of fancy terms like reconciliation, composition, and error boundaries.
2
But what do all these terms actually mean?
3
Let's start from the beginning with components.
4
Components are the building blocks of every React app.
5
They allow us to make all the visible parts of our applications, like buttons, inputs, or even entire pages.
6
Just like Legos, you can use components as many times as you want.
7
Every React component is a JavaScript function that returns markup.
8
But since React is a JavaScript library, React components don't return HTML markup.
9
They actually return something called JSX, which is JavaScript in disguise.
10
JSX is optional, but the alternative way to make user interfaces is with the function createElement, which gets annoying to write pretty fast.
11
So everyone just uses JSX.
12
Since JSX is JavaScript, you can't write attributes like you would in HTML.
13
You have to write them in the camel case style.
14
That means HTML attributes like class become class name.
15
Unlike HTML, which is static and unchanging, the benefit of using React is that you can use dynamic JavaScript values in your JSX.
16
If you have data, you can display it in your JSX using curly braces.
17
Curly braces accept values like strings and numbers directly.
18
You can use them to make your attributes dynamic.
19
And you can style React elements using a JavaScript object within the curly braces.
20
Since JavaScript functions can only return one thing, in React you can only return one parent element from a component.
21
So you can't do this without getting a big error.
22
We could fix this by wrapping these components in a div, but maybe you don't want to add another element to the page.
23
Instead, you can use an empty component called a React fragment.
24
Okay, but what if I want to pass data into another component?
25
For that, you use something called props.
26
To make a prop, create a name on the component you want to pass data to
27
and set it equal to some value.
28
And that's it.
29
You can then use that prop in the component you passed it to.
30
Props refers to properties on an object, which is what you get in the parameters of each component.
31
To use the prop, take it from the object like a normal JavaScript property.
32
Think of them like custom attributes you can add to any component.
33
So wait, can you pass anything as a prop?
34
Yes, you can.
35
You can even pass other components as props using the children prop.
36
If you make opening and closing tags for a component, you can pass other components in between them.
37
These past components are called children, and you can access them on the children prop of the parent component.
38
And it's great for something called composition, which is about organizing our React components in the most optimal way.
39
The children prop is really useful for creating layout components when you want your children to have the same common layout.
40
The key prop is another built -in prop to React.
41
And no, unlike the name implies, it doesn't unlock anything interesting.
42
The key prop is used so React can tell one component apart from another, usually when you're creating a list with the map function.
43
A key is just a unique string or number to identify a component.
44
You'll usually know when you need to add a key because React will warn you in the console.
45
Fortunately, if you don't have a unique value for each item, you can always use the current index from the map function.
46
But how does React take all my amazing code and make it display something in the browser?
47
That process is called rendering.
48
React does this for us, but it's important to know how it works, because sometimes we can do a bad thing and cause it to infinitely re -render,
49
which crashes our app.
50
The way React knows how and when to render our application is using something called the virtual DOM, also known as the VDOM.
51
Okay, but what does DOM mean?
52
DOM stands for Document Object Model, which is what every browser uses to model all the HTML elements on a web page.
53
And when you draw it out, it kind of looks like a tree.
54
Here's the complete rendering process in React.
55
If the state of our React app changes, then React updates the virtual DOM, which is quicker to update than the real DOM.
56
Then, React uses a process called "diffing" to compare the updated virtual DOM to a previous version to see what's changed.
57
Once it sees what's different, React uses a process called "reconciliation" to update the real DOM with the changes that it found.
58
Whenever someone uses our app, tons of events take place like clicks, mouse movements, and key presses, many of which we need to detect.
59
Event handling is how we take those user events and do something with them.
60
React has a lot of built -in events such as OnClick, OnChange, and OnSubmit.
61
These three events are ones you'll probably use the most.
62
If we want to alert users when a button is clicked, we would add the onClick prop to the button and connect it to a function that would show that alert.
63
To manage data in our React apps, we need to use state, not that kind of state though.
64
State is like a snapshot from a camera.
65
It's a picture of our app at any given time.
66
To manage state, we also can't use JavaScript variables.
67
They don't cause our app to re -render.
68
Instead, we use special functions like useState and useReducer.
69
useState takes an argument that serves as the starting value of the state variable, which is likes in this example,
70
and returns an array containing the state variable and a function to update that state.
71
Using our button example, we could also update the number of times the button's been clicked with the update function,
72
setClicks, and display it in the button with the state variable likes.
73
Controlled components use state values to have more predictable behavior.
74
Here's an example of a controlled component where the value typed into the input is being put into state
75
and controlled by the state variable value.
76
Here's how it works.
77
The user types and set value puts what the user typed into state.
78
The state value is then updated and finally, the input uses that updated state as its value.
79
Controlled components are a great pattern to use because if we want to change the component's behavior, we just need to change the state that controls it.
80
UseState is an example of a React hook, which allow us to hook into features such as state within function components.
81
There are five main types of hooks.
82
State hooks like useState and useReducer help you manage state within React components.
83
Context hooks such as useContext let you use data pass through React context Ref hooks,
84
such as useref, let you reference things like HTML elements, Effect hooks, like UseEffect, let you connect with external systems like browser APIs,
85
and performance hooks like Use Memo and Use Callback, which can improve performance by preventing unnecessary work.
86
You'll use all of these hooks at some point, but the majority of the time you'll likely use just three hooks in your React components: useState, useEffect, and use ref.
87
When you think of the word purity, you might think of something like purified water.
88
Purity is a term used to describe how React components should work.
89
But this type of purity is more like how mathematical formulas are pure.
90
Pure React components mean that the same input should always return the same output.
91
To keep a React component pure, they should only return their JSX and not change any objects or variables that existed before rendering.
92
The cup component in this example is impure because it changes the variable count during render, which exists outside the component.
93
This leads to JSX having the wrong output when it is used more than once.
94
To help make sure we don't run into errors like this, we can use something called strict mode.
95
Strict mode is a special component which tells us about mistakes as we develop our React apps.
96
It's really convenient because it's just a component.
97
We usually wrap around our app component and it'll tell us when we really shouldn't do something.
98
But what if we need to do something outside our React app?
99
Your app might need to talk with the browser API, or make a request to a server.
100
If you do have an external system, you're going to need a way to step outside of React.
101
Effects are code that reach outside of our React application.
102
Usually effects, also known as side effects, can be done within event handlers.
103
For example, to make an HTTP request when you submit a form or click on a button.
104
If you can't run your effects within an event handler, then you can run them using the Use Effect hook.
105
For example, a common pattern is to fetch data when components first load with the useEffect hook.
106
Like effects, sometimes you want to step outside React and work directly with the DOM.
107
To reference an actual DOM element, you can use what's called a ref.
108
You can create a ref with the useRef hook, and to get access to a DOM element, use the ref prop on any React element.
109
For some tasks such as focusing an input, it's much easier to reference the actual DOM element instead of attempting to do it the React way.
110
Context is a powerful way to pass prop data through your app's components.
111
Most React apps have tons of nested components.
112
To get data down multiple levels involves passing the same props through components that don't actually need it.
113
Context lets us jump through the component tree and use data at any level without making props.
114
To use context, you first create context and apparent component, then wrap your parent component in a special context component called a context provider.
115
Put the data you want to pass down on the provider, And finally, access that data in any child component with the Use Context hook.
116
Portals, on the other hand, are kind of like context but for components.
117
Portals let you move React components into any HTML element you select.
118
Portals are great for components that can't be displayed properly because of their parents' component styles.
119
for example, for displaying modals, drop -down menus, and tooltips.
120
To create a portal, just use the Create Portal function pass your component to it, and choose the HTML element where you'd like your React component to appear.
121
Suspense is a special component that helps you handle loading a component or its data.
122
Suspense is helpful for components that take some time to fetch data.
123
It provides a better user experience to show a fallback component, like a loading spinner, until the data is available instead of nothing.
124
Suspense is also useful if you're lazily loading a component, which lets us load a component only when it's needed.
125
Since React apps are all JavaScript, errors that happen during rendering can totally break your app.
126
Error boundaries are components that let you catch app -breaking errors
127
and show a fallback component to tell the user about what happened.
128
For example, our app will crash if we run this code because it throws an error when there's no user.
129
To prevent our app from crashing, we'll first add an error boundary to display a fallback component, with a more helpful error message to be displayed to the user.
130
Now if you really want to dive deep into React, I've put together a complete bootcamp to help you master every one of these concepts from front to back.
131
You can get started now at reactbootcamp .dev.
132
I hope you learned a lot in this video, and I'll see you in the next one.

이 비디오로 말하기 연습을 해야 하는 이유는 무엇인가요?

이 유튜브 비디오는 React라는 자바스크립트 라이브러리에 대해 쉽게 설명하고 있습니다. 이러한 기술적 주제를 배우면서 영어로 말하는 연습을 하는 것은 실용적인 활용을 높이는 데 도움이 됩니다. 영어 쉐도잉 기법을 활용해 보세요. 쉐도잉은 원어민의 발음을 모방하며 자연스럽게 말하기 능력을 향상시키는 방법입니다. 이 비디오에서는 다양한 컴포넌트와 JSX의 사용법을 통해, 기술적인 영어 어휘와 표현을 익힐 수 있습니다. 특히, 유튜브 영어 공부를 통해 진정한 의사소통 능력을 기르는데 큰 도움이 될 것입니다.

문맥 속 문법 및 표현

비디오에서 사용된 몇 가지 핵심 구조를 살펴보겠습니다:

  • props: "Props refers to properties on an object"라는 표현을 통해 객체의 속성에 대한 설명을 제공합니다. 이는 영어를 배우는 데에 있어 중요한 개념입니다.
  • JSX: "JSX is optional"이라는 문장에서는 JSX의 선택성을 언급합니다. JSX는 자바스크립트에서 사용되는 문법적 구조로, 이를 알고 사용하는 것이 중요합니다.
  • key prop: "The key prop is used so React can tell one component apart from another" 이 문장을 통해 키 속성의 역할을 이해할 수 있습니다. 이러한 기술적 요소는 영어 말하기에서 자주 사용되는 구문이므로 익혀두는 것이 좋습니다.

일반적인 발음 함정

비디오에서 다루는 내용 중 발음이 어려운 단어들을 주의 깊게 들어보세요. 특히 "reconciliation", "composition", "rendering"과 같은 기술 용어들은 발음이 tricky할 수 있습니다. shadow speech 기술을 활용하여 이러한 단어들을 반복적으로 연습해 보세요. 특히, "React"라는 단어의 발음에 주의하세요. 발음의 미세한 차이가 이해도를 결정짓기 때문입니다. shadowspeaks와 함께라면, 이러한 발음 연습도 보다 수월할 것입니다.

쉐도잉이란? 영어 실력을 빠르게 키우는 과학적 방법

쉐도잉(Shadowing)은 원래 전문 통역사 훈련을 위해 개발된 언어 학습 기법으로, 다언어 학자인 Dr. Alexander Arguelles에 의해 대중화된 방법입니다. 핵심 원리는 간단하지만 매우 강력합니다: 원어민의 영어를 들으면서 1~2초의 짧은 지연으로 즉시 소리 내어 따라 말하는 것——마치 '그림자(shadow)'처럼 화자를 따라가는 것입니다. 문법 공부나 수동적인 청취와 달리, 쉐도잉은 뇌와 입 근육이 동시에 실시간으로 영어를 처리하고 재현하도록 훈련합니다. 연구에 따르면 이 방법은 발음 정확도, 억양, 리듬, 연음, 청취력, 말하기 유창성을 크게 향상시킵니다. IELTS 스피킹 준비와 자연스러운 영어 소통을 원하는 분들에게 특히 효과적입니다.