Skip to content
This repository was archived by the owner on Jun 16, 2022. It is now read-only.

Commit f891ff8

Browse files
committed
added ability for devtool to move history backwards and forwards
1 parent e9eacb6 commit f891ff8

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.3.0 (June 12, 2018)
2+
* added ability for devtool to move history backwards and forwards
3+
14
## 1.2.0 (June 11, 2018)
25
* added hooks for devtool
36
* ensure production builds do not include devtool

dev-tool.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ export default (getThat, getUpdate) => {
3333
origin
3434
}
3535
return
36+
case 'move history backwards':
37+
window.history.go(-1)
38+
return sendStateToDevTool()
39+
case 'move history forwards':
40+
window.history.go(1)
41+
return sendStateToDevTool()
3642
default:
3743
// ignore messages we don't understand
3844
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flipstate",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "Scalable state management with Context API",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)