@nsail/stack 0.1.977 → 0.1.981

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/form.js +1 -1
  2. package/package.json +1 -1
package/dist/form.js CHANGED
@@ -13,6 +13,7 @@ export function useForm(message, initial) {
13
13
  const [submitting, setSubmitting] = useState(false);
14
14
  const [saved, setSaved] = useState(false);
15
15
  const sending = useRef(false);
16
+ // Bumped in the handlers below, never inside a state updater, which StrictMode runs twice.
16
17
  const edits = useRef(0);
17
18
  const set = useCallback((name, next) => {
18
19
  setValue((current) => ({ ...current, [name]: next }));
@@ -50,7 +51,6 @@ export function useForm(message, initial) {
50
51
  return false;
51
52
  }
52
53
  sending.current = true;
53
- // Counted in the handler, not in a state updater, which StrictMode runs twice.
54
54
  const sentAt = edits.current;
55
55
  setSubmitting(true);
56
56
  setSaved(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsail/stack",
3
- "version": "0.1.977",
3
+ "version": "0.1.981",
4
4
  "description": "NSail's vendor-free client half: sends messages from the descriptors an Sdk generates, speaks the catalog, and holds the hooks a page reads with.",
5
5
  "license": "MIT",
6
6
  "repository": {