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: readme.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# React-Time-Travel
2
2
3
+
<palign="center">
4
+
<imgsrc="demo.gif"alt="Demo of React-Time-Travel">
5
+
</p>
6
+
3
7
A debugging tool for React. Records state whenever state is changed and allows user to jump to any previous recorded state.
4
8
5
9
Two parts are needed for this tool to function. The chrome extension must be installed, and the NPM package must be installed and used in the React code.
@@ -9,9 +13,11 @@ Two parts are needed for this tool to function. The chrome extension must be ins
9
13
1. Download the Chrome extension from Chrome Web Store.
10
14
11
15
2. Install the [npm package](https://www.npmjs.com/package/react-time-travel) in your code.
16
+
12
17
```
13
18
npm i react-time-travel
14
19
```
20
+
15
21
3. Call the library method on your root container after rendering your App.
After installing both the Chrome extension and the npm package, just open up your project in the browser.
36
+
After installing both the Chrome extension and the npm package, just open up your project in the browser.
31
37
32
38
Then open up your Chrome DevTools. There'll be a new tab called React-Time-Travel.
33
39
34
40
## Features
35
41
36
42
### Recording
37
43
38
-
Whenever state is changed (whenever setState is called), this extension will create a snapshot of the current state tree and record it. Each snapshot will be displayed in Chrome DevTools under the React-Time-Travel panel.
44
+
Whenever state is changed (whenever setState is called), this extension will create a snapshot of the current state tree and record it. Each snapshot will be displayed in Chrome DevTools under the React-Time-Travel panel.
39
45
40
46
### Viewing
41
47
42
-
You can click on a snapshot to view your app's state. State can be visualized in a JSON or a tree.
48
+
You can click on a snapshot to view your app's state. State can be visualized in a JSON or a tree.
43
49
44
50
The selected snapshot can also be diffed/compared with the current dom.
45
51
@@ -49,23 +55,23 @@ The most important feature of all. Jumping to any previous recorded snapshot. Hi
49
55
50
56
### Others
51
57
52
-
Other handy features include:
53
-
* multiple tabs support
54
-
* a slider to move through snapshots quickly
55
-
* a play button to move through snapshots automatically
56
-
* a pause which button stops recording each snapshot
57
-
* a lock button to freeze the DOM in place. setState will lose all functionality while the extension is locked
58
-
* a persist button to keep snapshots upon refresh. handy when changing code and debugging
59
-
* export/import the current snapshots in memory
58
+
Other handy features include:
59
+
60
+
- multiple tabs support
61
+
- a slider to move through snapshots quickly
62
+
- a play button to move through snapshots automatically
63
+
- a pause which button stops recording each snapshot
64
+
- a lock button to freeze the DOM in place. setState will lose all functionality while the extension is locked
65
+
- a persist button to keep snapshots upon refresh. handy when changing code and debugging
0 commit comments