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
Note that, the `useAction` hook can accept a second parameter which is the list of actions that you want to use. If you don't specify the second parameter, all the actions of the signal will be returned.
290
+
### `useAction`
293
291
294
-
There is another thing that you have to know.
295
-
If you provide only one action as a second parameter, the hook will return only the action itself and not an object that contains the action.
292
+
This hook takes the name of the signal as the first parameter and the name of the action as the second one and then return that action.
296
293
297
294
```js
298
295
constincrement=useAction("counter", "increment");
299
296
```
300
297
301
-
And if you provide more than one action, the hook will return an object that contains all the actions provided.
0 commit comments