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
`clone` was used to extend an action client with new middleware functions. Now you can directly use
`use` method to extend your action client(s), since it will return a new instance of the action
client itself, with previous cloned middleware functions + the one you just passed to `use`.
Copy file name to clipboardexpand all lines: website/docs/safe-action-client/instance-methods.md
-8
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,6 @@ description: List of methods of the safe action client.
7
7
8
8
`createSafeActionClient` creates an instance of the safe action client, which has the following methods:
9
9
10
-
## `clone`
11
-
12
-
```typescript
13
-
actionClient.clone() =>newSafeActionClient()
14
-
```
15
-
16
-
`clone` returns a new instance of the safe action client with the same initialization options and middleware functions as the original one. It is used to extend a base client with additional middleware functions. If you don't use `clone` when creating a new client, the middleware function list of the original one will be mutated and extended with the new ones, which is not desirable.
0 commit comments