You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,6 +29,7 @@ function serializeState(state) {
26
29
}
27
30
}
28
31
32
+
29
33
/**
30
34
* This is the current snapshot that is being sent to the snapshots array.
31
35
* Creates a Tree
@@ -53,32 +57,71 @@ class Tree {
53
57
54
58
recoilDomNode: any;
55
59
60
+
//Duplicate names: add a unique number ID
61
+
//Create an object 'componentNames' to store each component name as a key and it's frequency of use as its value
62
+
//When a new component is made on the tree, check if the new component's name already exists in 'componentNames' (possibly with the .hasOwnProperty method)
63
+
//If the name already exists, add its value (an integer) to the name
64
+
//Also, increment the value after
65
+
//If not, create the new component and also a new key: value pair in 'componentNames' with the component's name as the key and 0 as its value
66
+
//EXAMPLE OF COMPONENTNAMES OBJECT: {editableInput: 1, Provider: 0, etc}
exportconstIndeterminateComponent=2;// Before we know whether it is function or class
83
82
exportconstHostRoot=3;// Root of a host tree. Could be nested inside another node.
84
83
exportconstHostPortal=4;// A subtree. Could be an entry point to a different renderer.
85
-
exportconstHostComponent=5;
84
+
exportconstHostComponent=5;// has stateNode of html elements
86
85
exportconstHostText=6;
87
86
exportconstFragment=7;
88
87
exportconstMode=8;
@@ -92,7 +91,7 @@ export const ForwardRef = 11;
92
91
exportconstProfiler=12;
93
92
exportconstSuspenseComponent=13;
94
93
exportconstMemoComponent=14;
95
-
exportconstSimpleMemoComponent=15;
94
+
exportconstSimpleMemoComponent=15;// A higher order component where if the component renders the same result given the same props, react skips rendering the component and uses last rendered result. Has memoizedProps/memoizedState but no stateNode
0 commit comments