git checkout aaa
โ> Swtiches the user's current branch into aaa branch. (The workspace changes)
git branch
โ> Shows the current branch location
git checkout master
โ> Returns back to master branch.
git pull
โ> Updates all the branches that the user created.
Value: The value that cannot be changed.
--> Here, the value is fixed to qqqq...
Whatever the user tries to type in, the value is always qqqqq... .
Different from defaultValue:
defaultValue: The initial value that would disappear once the user types in something rather than null.
If defaultValue is set as qqq, the initial value is qqq but when the user tries to give a change, the input box value is able to change.
--> It's not forever qqq, but qqq for the first time the code is executed.
setMyWriter(โโ)
setMyPassword("")
setMyContents("")
*If the user wants to click anywhere of the box to move to the other page, use event bubbling.
: Executing from child component to parent component. (์์์์ ๋ถ๋ชจ๋ก ์ด๋ฒคํธ ์ ํ)
Meaning, even if onclick function is bined to parent, outside onclick is also executed when the clicking child.
event.currentTarget.id
Party of event bubbling. (๋น์ฌ์)
--> eventTarget is the thing the user directly clicked.
--> currentTarget is declaring the function directly.
event.capturing
Exectued from parent to child.
: Package of bunch of tools.
"To reinvent the wheel"
: Waste a great deal of time or effort in creating something that already exists.
Using library does...
-saves time
-reduces errors
-able to use in diverse browsers
-able to resize freely
-addition of functions inside
But becareful to use verified libraries: The most downloaded libraries.
Check whether the library is stabalized.
UI Framework is where all the UI Libraries are contained.
*Ant-Design used(antd is created only for react)
< Downloading antd>
1. Terminal
--> yarn add antd
2. Working Page
--> import 'antd/dist/antd.cssโ
โฌ๏ธ example
import {ScissorOutlined} from '@ant-design/icons'
import styled from '@emotion/styled'
const MyIcon = styled(ScissorOutlined)`
color: skyblue;
font-size: 50px; `
export default function LibraryIconPage(){
return <MyIcon/>
}
Scope: {}
Scope-Chain: Happens when the key cannot find its value inside its scope when doing "console.log". By scope-chaining, the key can find it's value in the outside scope.