Skip to content

Commit 17121e7

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Removed recoildomNode from tree.ts r/t deprecated recoil.js
1 parent 2e55783 commit 17121e7

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/backend/linkFiber.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ const circularComponentTable = new Set();
4646
let initialstart = false;
4747
let rtidCounter = 0;
4848
let rtid = null;
49-
const recoilDomNode = {};
5049

5150
/**
5251
* @method sendSnapshot

src/backend/tree.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,8 @@ class Tree {
5151

5252
isExpanded: boolean;
5353

54-
atomsComponents: any;
55-
56-
atomSelectors: any;
57-
5854
rtid: any;
5955

60-
recoilDomNode: any;
61-
6256
route: {};
6357

6458
// Duplicate names: add a unique number ID
@@ -69,15 +63,14 @@ class Tree {
6963
// 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
7064
// EXAMPLE OF COMPONENTNAMES OBJECT: {editableInput: 1, Provider: 0, etc}
7165

72-
constructor(state: string | {}, name = 'nameless', componentData: {} = {}, rtid: any = null, recoilDomNode: any = null, string: any = null) {
66+
constructor(state: string | {}, name = 'nameless', componentData: {} = {}, rtid: any = null, string: any = null) {
7367
this.state = state === 'root' ? 'root' : serializeState(state);
7468
this.name = name;
7569
this.componentData = componentData ? { ...JSON.parse(JSON.stringify(componentData)) } : { };
7670
this.children = [];
7771
this.parent = null; // ref to parent so we can add siblings
7872
this.isExpanded = true;
7973
this.rtid = rtid;
80-
this.recoilDomNode = recoilDomNode;
8174
}
8275

8376
// Returns a unique name ready to be used
@@ -98,17 +91,17 @@ class Tree {
9891
return name;
9992
}
10093

101-
addChild(state: string | {}, name: string, componentData: {}, rtid: any, recoilDomNode: any): Tree {
94+
addChild(state: string | {}, name: string, componentData: {}, rtid: any): Tree {
10295
const uniqueName = this.checkForDuplicates(name);
103-
const newChild: Tree = new Tree(state, uniqueName, componentData, rtid, recoilDomNode);
96+
const newChild: Tree = new Tree(state, uniqueName, componentData, rtid);
10497
newChild.parent = this;
10598
this.children.push(newChild);
10699
return newChild;
107100
}
108101

109-
addSibling(state: string | {}, name: string, componentData: {}, rtid: any, recoilDomNode: any): Tree {
102+
addSibling(state: string | {}, name: string, componentData: {}, rtid: any): Tree {
110103
const uniqueName = this.checkForDuplicates(name);
111-
const newSibling: Tree = new Tree(state, uniqueName, componentData, rtid, recoilDomNode);
104+
const newSibling: Tree = new Tree(state, uniqueName, componentData, rtid);
112105
newSibling.parent = this.parent;
113106
this.parent.children.push(newSibling);
114107
return newSibling;
@@ -127,7 +120,7 @@ class Tree {
127120
circularComponentTable.clear();
128121
}
129122
// creates copy of present node
130-
let copy: Tree = new Tree(this.state, this.name, this.componentData, this.rtid, this.recoilDomNode);
123+
let copy: Tree = new Tree(this.state, this.name, this.componentData, this.rtid);
131124
delete copy.parent;
132125
circularComponentTable.add(this);
133126
copy = scrubUnserializableMembers(copy);

0 commit comments

Comments
 (0)