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
Copy file name to clipboardExpand all lines: src/backend/linkFiber.ts
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -59,13 +59,11 @@ import {
59
59
importTreefrom'./tree';
60
60
// passes the data down to its components
61
61
importcomponentActionsRecordfrom'./masterState';
62
-
importroutesfrom'./routes';
63
62
importupdateSnapShotTreefrom'./snapShot';
64
63
65
64
// throttle returns a function that can be called any number of times (possibly in quick succession) but will only invoke the callback at most once every x ms
66
65
// getHooksNames - helper function to grab the getters/setters from `elementType`
67
66
import{throttle,getHooksNames}from'./helpers';
68
-
import{any}from'prop-types';
69
67
70
68
// Set global variables to use in exported module and helper functions
71
69
declare global {
@@ -76,7 +74,7 @@ declare global {
76
74
}
77
75
78
76
// TODO: Determine what Component Data Type we are sending back for state, context, & props
79
-
typeComponentData={
77
+
typeReactimeData={
80
78
[key: string]: any;
81
79
};
82
80
@@ -188,8 +186,8 @@ const exclude = new Set([
188
186
*/
189
187
functionconvertDataToString(
190
188
reactDevData: {[key: string]: any},
191
-
reactimeData: ComponentData={},
192
-
): ComponentData{
189
+
reactimeData: ReactimeData={},
190
+
): ReactimeData{
193
191
for(constkeyinreactDevData){
194
192
// Skip keys that are in exclude set OR if there is no value at key
195
193
// Falsy values such as 0, false, null are still valid value
@@ -225,7 +223,7 @@ function trimContextData(
225
223
if(ignoreComponent.has(componentName))return;
226
224
227
225
// Initialize object to store state and context data of the component
228
-
constreactimeData: ComponentData={};
226
+
constreactimeData: ReactimeData={};
229
227
// Initialize counter for the default naming. If user use reactHook, such as useState, react will only pass in the value, and not the variable name of the state.
* Rebuilds the browser history stack using the copy of the stack maintained in the values stack. https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState, https://developer.mozilla.org/en-US/docs/Web/API/History/pushState
76
+
* Rebuilds the browser history stack using the copy of the stack maintained in the `routeHistory` stack. https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState, https://developer.mozilla.org/en-US/docs/Web/API/History/pushState
throwError('Error at Routes.navigage: targetIndex is undefined');
108
+
}
109
+
/**
110
+
* The position in the window history to which you want to move, relative to the current page. A negative value moves backwards, a positive value moves forwards.
111
+
*/
95
112
constdelta: number=targetIndex-this.current;
96
113
114
+
// Update the position within routeHistory stack
97
115
this.current+=delta;
98
116
117
+
// if delta != 0 => need to navigate to another page
Copy file name to clipboardExpand all lines: src/backend/types/backendTypes.ts
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,9 @@ import Tree from '../tree';
6
6
/**
7
7
* @type Tree - The snapshot of the current tree
8
8
* @member tree - {Tree} - The tree structure to send to front end
9
-
* @member unfilteredTree - {null} - The current mode (i.e. jumping, time-traveling, or paused)
10
9
*/
11
10
exportinterfaceSnapshot{
12
11
tree: Tree;
13
-
unfilteredTree: null;
14
12
}
15
13
16
14
/**
@@ -245,7 +243,7 @@ export type Fiber = {
245
243
246
244
/**
247
245
* @type FiberRoot - The internal data structure that represents a fiberRootNode or the top-level node of a single component tree
248
-
*
246
+
*
249
247
* FiberRoot data structure has several properties. For Reactime, we only access the `current` property which contains the tree structure made of `fiberNode`. Each `fiberNode` contains a component data in the React component tree.
0 commit comments