Skip to content

Commit c1e9805

Browse files
committed
remove comments etc.
1 parent e876a23 commit c1e9805

File tree

4 files changed

+3
-326
lines changed

4 files changed

+3
-326
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"presets": ["airbnb", "@babel/preset-typescript"],
3-
// "plugins": ["@emotion"]
2+
"presets": ["airbnb", "@babel/preset-typescript"]
43
}

src/app/components/StateRoute/StateRoute.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,7 @@ const NO_STATE_MSG = 'No state change detected. Trigger an event to change state
2222

2323

2424
const StateRoute = (props: StateRouteProps) => {
25-
const { snapshot, hierarchy, snapshots, viewIndex, webMetrics, currLocation } = props;
26-
// console.log(props);
27-
console.log('snapshot props', snapshot);
28-
// console.log('hierarchy props', hierarchy);
29-
// console.log('snapshots props', snapshots);
30-
console.log('viewIndex props', viewIndex);
31-
// console.log('webMetrics props', webMetrics);
32-
// console.log('currentLocation props', currLocation)
25+
const { snapshot, hierarchy, snapshots, viewIndex, webMetrics, currLocation } = props;
3326
const [{ tabs, currentTab }, dispatch] = useStoreContext();
3427
const { hierarchy, sliderIndex, viewIndex } = tabs[currentTab];
3528
console.log()

src/backend/controllers/createTree.ts

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -152,42 +152,7 @@ export default function createTree(currentFiberNode: Fiber): Tree {
152152
}
153153
}
154154

155-
// COMMENT OUT SINCE EXTRACTING CONTEXT IS STILL IN EXPERIMENT
156-
// // ------------APPEND CONTEXT DATA FROM REACT DEV TOOL----------------
157-
// // memoizedState
158-
// // Note: if user use ReactHook, memoizedState.memoizedState can be a falsy value such as null, false, ... => need to specify this data is not undefined
159-
// if (
160-
// (tag === FunctionComponent || tag === ClassComponent || tag === IndeterminateComponent) &&
161-
// memoizedState?.memoizedState !== undefined
162-
// ) {
163-
// // If user uses Redux, context data will be stored in memoizedState of the Provider component => grab context object stored in the memoizedState
164-
// if (elementType.name === 'Provider') {
165-
// Object.assign(
166-
// componentData.context,
167-
// getStateAndContextData(memoizedState, elementType.name, _debugHookTypes),
168-
// );
169-
// }
170-
// // Else if user use ReactHook to define state => all states will be stored in memoizedState => grab all states stored in the memoizedState
171-
// // else {
172-
// // Object.assign(
173-
// // componentData.state,
174-
// // getStateAndContextData(memoizedState, elementType.name, _debugHookTypes),
175-
// // );
176-
// // }
177-
// }
178-
// // if user uses useContext hook, context data will be stored in memoizedProps.value of the Context.Provider component => grab context object stored in memoizedprops
179-
// // Different from other provider, such as Routes, BrowserRouter, ReactRedux, ..., Context.Provider does not have a displayName
180-
// // TODO: need to render this context provider when user use useContext hook.
181-
//
182-
//
183-
// if (tag === ContextProvider && !elementType._context.displayName) {
184-
// let stateData = memoizedProps.value;
185-
// if (stateData === null || typeof stateData !== 'object') {
186-
// stateData = { CONTEXT: stateData };
187-
// }
188-
// componentData.context = filterAndFormatData(stateData);
189-
// componentName = 'Context';
190-
// }
155+
191156

192157
// ---------OBTAIN STATE & SET STATE METHODS FROM CLASS COMPONENT-----------
193158
// Check if currentFiberNode is a stateful class component when user use setState.

0 commit comments

Comments
 (0)