File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
blog/2023-10-02-persisting-state Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ const actor = createActor(machine, {
122
122
actor.start();
123
123
```
124
124
125
- The actor will start at the `restoredState`, if it exists. If it is `undefined`, the actor will start at the initial state of the actor logic provided to `createActor(logic)`.
125
+ The actor will start at the `restoredState`, if it exists. If `restoredState` is `undefined`, the actor will start at the initial state of the actor logic provided to `createActor(logic)`.
126
126
127
127
## Persistence strategies
128
128
@@ -132,7 +132,7 @@ For the browser, you can:
132
132
- Use a client-side database like [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
133
133
- Use [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
134
134
- Use [sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)
135
- - Store it in runtime memory (e.g., a global variable or some other persistent store)
135
+ - Store the state in runtime memory (e.g., a global variable or some other persistent store)
136
136
137
137
For the server, you can:
138
138
You can’t perform that action at this time.
0 commit comments