Skip to content

Commit

Permalink
FY-215/refactor: remain observedBits
Browse files Browse the repository at this point in the history
  • Loading branch information
JinmuGo committed Mar 17, 2024
1 parent 41ffe6e commit ac57fe9
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion srcs/context/newContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ const prepareToReadContext = (workInProgress, renderExpirationTime) => {
/**
*
* @param {Tcontext} context
* @param {number} observedBits
*
* @description - readContext의 목표는 context 값을 읽는 것입니다.
* 이 함수에서 context의 값을 읽습니다.
Expand Down
1 change: 0 additions & 1 deletion srcs/hooks/useContext/useContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import hookCore from "../core/hookCore.js";
* @description This function is useContext hook.
*
* @param {TContext} context
* @param {number | undefined} observedBits
*/
const useContext = (context) => {
return hookCore.RfsCurrentDispatcher.current.useContext(context);
Expand Down
2 changes: 1 addition & 1 deletion srcs/work/beginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const updateContextConsumer = (current, workInProgress, renderExpirationTime) =>
prepareToReadContext(workInProgress, renderExpirationTime);

// readContext를 통해 context 값을 가져옵니다.
const newValue = readContext(context, newProps.unstable_observedBits);
const newValue = readContext(context);

// child component를 context의 값을 넣어 호출합니다.
const newChildren = render(newValue);
Expand Down
2 changes: 0 additions & 2 deletions type/TContextItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
* @typedef {Object} TContextItem
*
* @property {TContext} context
* @property {number} observedBits
* @property {TContextItem | null} next
*/
const TContextItem = {
context,
observedBits: 0,
next: null,
};
1 change: 0 additions & 1 deletion type/THookUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
const ThookUpdate = {
expirationTime: 0,
suspenseConfig: null,
action: null,
eagerReducer: null,
eagerState: null,
Expand Down

0 comments on commit ac57fe9

Please sign in to comment.