@molecule/app-react-native 3.0.0 → 3.0.1

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/README.md +12 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-27T23:36:39.690Z
6
+ Generated: 2026-10-28T08:44:21.978Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-react-native
@@ -3261,6 +3261,17 @@ const useAsyncState: <T>(initialState: T) => [T, AsyncSetState<T>, AsyncExtendSt
3261
3261
 
3262
3262
  Hook that wraps an async function with state tracking.
3263
3263
 
3264
+ For one UI action, pass `state.status === 'pending'` to `Button loading`
3265
+ from `@molecule/app-ui-react` (or to a native control's `disabled` prop).
3266
+ The control then refuses input while the request is pending and re-enables
3267
+ when the tracked call settles. Handle the returned promise's rejection;
3268
+ the hook also records the failure in `state.error`.
3269
+
3270
+ This hook tracks the latest call: it does not serialize invocations or
3271
+ cancel their network requests. An explicit reset/cancel changes the tracked
3272
+ state, so it is not proof that an outstanding request has stopped. Use an
3273
+ app-owned queue when every click must be accepted in order.
3274
+
3264
3275
  ```typescript
3265
3276
  const usePromise: <T extends (...args: any[]) => Promise<any>>(
3266
3277
  asyncFn: T,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-react-native",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "React Native framework bindings for molecule.dev",
5
5
  "homepage": "https://www.molecule.dev/packages/app-react-native",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "directory": "packages/app/frameworks/react-native"
34
34
  },
35
35
  "devDependencies": {
36
- "@molecule/app-react": "3.0.0",
36
+ "@molecule/app-react": "3.0.1",
37
37
  "@types/node": "26.6.5",
38
38
  "react": "19.3.1",
39
39
  "typescript": "6.0.3",