Skip to content

Commit a16f99b

Browse files
committed
edit a few thing
1 parent 981b77e commit a16f99b

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"react-html-parser": "^2.0.2",
119119
"react-json-tree": "^0.11.2",
120120
"react-router-dom": "^5.2.0",
121-
"react-select": "^3.1.0"
121+
"react-select": "^3.1.0",
122+
"recoil": "0.0.10"
122123
}
123124
}

src/backend/helpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ export const getHooksNames = (elementType) => {
100100
});
101101
}
102102
});
103-
103+
104+
// el !== undefined &&
104105
// Iterate array and determine getter/setters based on pattern
106+
// console.log('abc');
105107
statements.forEach((el, i) => {
106108
if (el.match(/_use/)) hookState[el] = statements[i + 2];
107109
});

src/backend/linkFiber.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ import 'core-js';
3636

3737
// const Tree = require('./tree').default;
3838
// const componentActionsRecord = require('./masterState');
39-
39+
import { useGotoRecoilSnapshot, RecoilRoot, useRecoilSnapshot } from 'recoil';
4040
import {
4141
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4242
Snapshot, Mode, ComponentData, HookStates, Fiber
4343
} from './types/backendTypes';
4444
import Tree from './tree';
4545
import componentActionsRecord from './masterState';
4646
import { throttle, getHooksNames } from './helpers';
47+
import ReactDOM from 'react-dom';
48+
49+
console.log(ReactDOM);
4750

4851
declare global {
4952
interface Window {
@@ -234,10 +237,13 @@ export default (snap: Snapshot, mode: Mode): ()=>void => {
234237
const devTools = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
235238
const reactInstance = devTools ? devTools.renderers.get(1) : null;
236239
fiberRoot = devTools.getFiberRoots(1).values().next().value;
237-
240+
console.log(fiberRoot);
238241
const throttledUpdateSnapshot = throttle(updateSnapShotTree, 70);
239242
document.addEventListener('visibilitychange', onVisibilityChange);
240243

244+
let snapshot = useRecoilSnapshot();
245+
console.log('here is an example of snapshot', snapshot);
246+
console.log(RecoilRoot);
241247
if (reactInstance && reactInstance.version) {
242248
devTools.onCommitFiberRoot = (function (original) {
243249
return function (...args) {

src/backend/recoilidea.js

Whitespace-only changes.

0 commit comments

Comments
 (0)