From 14037f2c80037925e01515ef2facc0831e8c9b43 Mon Sep 17 00:00:00 2001 From: unadlib Date: Sat, 23 Mar 2024 14:48:19 +0800 Subject: [PATCH] docs(readme): update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7f0ece..078530c 100644 --- a/README.md +++ b/README.md @@ -112,9 +112,9 @@ const App = () => { > `TravelPatches` is the type of patches history, it includes `patches` and `inversePatches`. -If you want to control the state travel manually, you can set the `autoArchive` option to `false`, and use the `controls.archive` function to archive the state. +> If you want to control the state travel manually, you can set the `autoArchive` option to `false`, and use the `controls.archive` function to archive the state. -If you want to persist the state, you can use `state`/`controls.patches`/`controls.position` to save the travel history. Then, read the persistent data as `initialState`, `initialPatches`, and `initialPosition` when initializing the state, like this: +> If you want to persist the state, you can use `state`/`controls.patches`/`controls.position` to save the travel history. Then, read the persistent data as `initialState`, `initialPatches`, and `initialPosition` when initializing the state, like this: ```jsx const [state, setState, controls] = useTravel(initialState, {