210405_TIL
IM: DAY 43
Redux : DAY ONE
とても幸せな日💕💕💕
今日やったこと
学習
学習
Redux Achievement goals
ステータス管理ライブラリが必要な理由を理解します.Redux(またはFlux Pattern)で使用されるアクション、Reducer、およびStoreの意味と特徴を理解します.Reduxの3つの原則は何なのか,主な概念とどのように結びついているのか.素子とコンテンツ素子を表す概念が理解できる.Redux hooks(ユーザセレクタ、ユーザDispatch)を使用してstoreを更新できます.
覚えておきたい
Redux
今日勉強した李徳思についての内容をブログにまとめます.
👉 [react]Reduxベース
Object.assign()
リスト可能な1つまたは複数のsource
オブジェクトからtarget
オブジェクトに属性をコピーするために使用されます.は、target
オブジェクトを返します.Object.assign(target, ...sources)
const target = { a: 1, b: 2 }; // mutable -- 여기에 source가 병합되어 리턴된다.
const source = { b: 4, c: 5 }; // immutable
const returnedTarget = Object.assign(target, source);
console.log(source); // output: { b: 4, c: 5 }
console.log(target); // output: { a: 1, b: 4, c: 5 }
console.log(returnedTarget); // output: { a: 1, b: 4, c: 5 }
Element.getBoundingClientRect()
画面(viewport)に基づいて特定の領域の位置値を取得する方法.
DOM法Element.getBoundingClientRect()
を使用すればよい.使い方は以下の通りです.
ほとんどのブラウザでサポートされています.(IEはx、y値を取得できません)const domRect = element.getBoundingClientRect();
/*
domRect = { x, y, left, right, top, bottom, width, height };
*/
明日やること
Object.assign(target, ...sources)
const target = { a: 1, b: 2 }; // mutable -- 여기에 source가 병합되어 리턴된다.
const source = { b: 4, c: 5 }; // immutable
const returnedTarget = Object.assign(target, source);
console.log(source); // output: { b: 4, c: 5 }
console.log(target); // output: { a: 1, b: 4, c: 5 }
console.log(returnedTarget); // output: { a: 1, b: 4, c: 5 }
const domRect = element.getBoundingClientRect();
/*
domRect = { x, y, left, right, top, bottom, width, height };
*/
学習
🔖 ブックマーク
Reference
この問題について(210405_TIL), 我々は、より多くの情報をここで見つけました https://velog.io/@seungsang00/210405TILテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol