Skip to content

Commit 0c7cd47

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Deleted function traverseRecoilHooks from linkfiber.ts r/t deprecated recoil.js
1 parent b48c352 commit 0c7cd47

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/backend/linkFiber.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -113,40 +113,6 @@ function updateSnapShotTree(snap: Snapshot, mode: Mode): void {
113113
// );
114114
// }
115115

116-
/**
117-
* @method traverseRecoilHooks
118-
* @param memoizedState Property containing state on a stateful fctnl component's FiberNode object
119-
* @param memoizedProps Property containing props on a stateful fctnl component's FiberNode object
120-
* @return An array of array of HookStateItem objects (state and component properties)
121-
*/
122-
123-
// if type of state - Recoil hooks
124-
function traverseRecoilHooks(
125-
// State of the fiber that was used to create the output. When processing updates it reflects the state that’s currently rendered on the screen.
126-
memoizedState: any,
127-
// Props of the fiber that were used to create the output during the previous render.
128-
memoizedProps: any
129-
): HookStates {
130-
const hooksStates: HookStates = [];
131-
while (memoizedState && memoizedState.queue) {
132-
if (
133-
memoizedState.memoizedState
134-
&& memoizedState.queue.lastRenderedReducer
135-
&& memoizedState.queue.lastRenderedReducer.name === 'basicStateReducer'
136-
) {
137-
if (Object.entries(memoizedProps).length !== 0) {
138-
hooksStates.push({
139-
component: memoizedState.queue,
140-
state: memoizedProps,
141-
});
142-
}
143-
}
144-
memoizedState = memoizedState.next !== memoizedState ? memoizedState.next : null;
145-
}
146-
147-
return hooksStates;
148-
}
149-
150116
/**
151117
* @method traverseHooks
152118
* @param memoizedState memoizedState property on a stateful fctnl component's FiberNode object

0 commit comments

Comments
 (0)