diff --git a/package.json b/package.json index 41322d2..f0b9dbc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "use-travel", - "version": "1.0.3", + "version": "1.1.0", "description": "A React hook for state time travel with undo, redo, reset and archive functionalities.", "main": "dist/index.cjs.js", "unpkg": "dist/index.umd.js", diff --git a/src/index.ts b/src/index.ts index 4dd0639..7b926f2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -193,7 +193,7 @@ export const useTravel = ( }); } }, - [state, position, setTempPatches] + [allPatches, state, position, setTempPatches] ); const archive = () => { if (autoArchive) {