Skip to content

Commit d060132

Browse files
authoredMay 7, 2024··
feat: support stateful actions via stateAction method and useStateAction hook (#110)
This PR adds support for stateful actions (used for React `useActionState` hook) via the `stateAction` method, and the `useStateAction` hook.
1 parent 242dbf8 commit d060132

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9160
-6001
lines changed
 

‎.github/ISSUE_TEMPLATE/1_bug_report.yml

+66-66
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,71 @@ description: Create a report to help us fix bugs.
33
title: "[BUG] "
44
labels: ["bug"]
55
body:
6-
- type: checkboxes
7-
attributes:
8-
label: Are you using the latest version of this library?
9-
description: Please confirm that you are using the latest version of next-safe-action.
10-
options:
11-
- label: I verified that the issue exists in the latest next-safe-action release
6+
- type: checkboxes
7+
attributes:
8+
label: Are you using the latest version of this library?
9+
description: Please confirm that you are using the latest version of next-safe-action.
10+
options:
11+
- label: I verified that the issue exists in the latest next-safe-action release
12+
required: true
13+
- type: checkboxes
14+
attributes:
15+
label: Is there an existing issue for this?
16+
description: Please search to see if an issue already exists for the bug you encountered.
17+
options:
18+
- label: I have searched the existing issues and found nothing that matches
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Describe the bug
23+
description: A clear and concise description of what the bug is.
24+
placeholder: I found out that the '...' functionality is not working.
25+
validations:
1226
required: true
13-
- type: checkboxes
14-
attributes:
15-
label: Is there an existing issue for this?
16-
description: Please search to see if an issue already exists for the bug you encountered.
17-
options:
18-
- label: I have searched the existing issues and found nothing that matches
27+
- type: textarea
28+
attributes:
29+
label: Reproduction steps
30+
description: Steps to reproduce the incorrect behavior.
31+
placeholder: |
32+
A step-by-step reproduction of the bug. For example:
33+
1. Go to '...'
34+
2. Click on '...'
35+
3. Scroll down to '...'
36+
4. See error
37+
validations:
1938
required: true
20-
- type: textarea
21-
attributes:
22-
label: Describe the bug
23-
description: A clear and concise description of what the bug is.
24-
placeholder: I found out that the '...' functionality is not working.
25-
validations:
26-
required: true
27-
- type: textarea
28-
attributes:
29-
label: Reproduction steps
30-
description: Steps to reproduce the incorrect behavior.
31-
placeholder: |
32-
A step-by-step reproduction of the bug. For example:
33-
1. Go to '...'
34-
2. Click on '...'
35-
3. Scroll down to '...'
36-
4. See error
37-
validations:
38-
required: true
39-
- type: textarea
40-
attributes:
41-
label: Expected behavior
42-
description: A description of what you expected to happen instead.
43-
placeholder: I expected that this happened instead.
44-
validations:
45-
required: true
46-
- type: input
47-
attributes:
48-
label: Reproduction example
49-
description: Link to an example that reproduces the bug. Could be, for example, a GitHub repo or a CodeSandbox link.
50-
placeholder: https://github.com/...
51-
validations:
52-
required: true
53-
- type: markdown
54-
attributes:
55-
value: Information about the environment you are using.
56-
- type: input
57-
attributes:
58-
label: Operating System
59-
placeholder: Windows 11, macOS, Ubuntu 22.04
60-
validations:
61-
required: true
62-
- type: input
63-
attributes:
64-
label: Library version
65-
placeholder: 6.0.0
66-
validations:
67-
required: true
68-
- type: textarea
69-
attributes:
70-
label: Additional context
71-
description: Add any other context about the problem here.
72-
validations:
73-
required: false
39+
- type: textarea
40+
attributes:
41+
label: Expected behavior
42+
description: A description of what you expected to happen instead.
43+
placeholder: I expected that this happened instead.
44+
validations:
45+
required: true
46+
- type: input
47+
attributes:
48+
label: Reproduction example
49+
description: Link to an example that reproduces the bug. Could be, for example, a GitHub repo or a CodeSandbox link.
50+
placeholder: https://github.com/...
51+
validations:
52+
required: true
53+
- type: markdown
54+
attributes:
55+
value: Information about the environment you are using.
56+
- type: input
57+
attributes:
58+
label: Operating System
59+
placeholder: Windows 11, macOS, Ubuntu 22.04
60+
validations:
61+
required: true
62+
- type: input
63+
attributes:
64+
label: Library version
65+
placeholder: 6.0.0
66+
validations:
67+
required: true
68+
- type: textarea
69+
attributes:
70+
label: Additional context
71+
description: Add any other context about the problem here.
72+
validations:
73+
required: false

‎.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ contact_links:
55
about: Do you want to help us improve the library? Open a new discussion to suggest an idea.
66
- name: Ask a question
77
url: https://github.com/TheEdoRan/next-safe-action/discussions/new?category=q-a
8-
about: Do you want to ask something about the library? Open a new discussion to get help from the community.
8+
about: Do you want to ask something about the library? Open a new discussion to get help from the community.

0 commit comments

Comments
 (0)
Please sign in to comment.