@httpstate/react 0.0.13 → 0.0.15

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 +61 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # httpstate (react)
2
+
3
+ ## Quick Start
4
+
5
+ Install
6
+
7
+ ```bash
8
+ npm install @httpstate/react
9
+ ```
10
+
11
+ Import
12
+
13
+ ```bash
14
+ import { useHttpState } from '@httpstate/react';
15
+ ```
16
+
17
+ Pick any valid UUID v4. You can [generate one here](https://uuid.httpstate.com).
18
+
19
+ We'll use `45fb3654-0e92-44da-aa21-ca409c6bdab3` or `45fb36540e9244daaa21ca409c6bdab3 (without dashes).
20
+
21
+ Use `useHttpState(uuid)` as you would do with a React `useState()` hook.
22
+
23
+ ```tsx
24
+ const [state, setState] = useHttpState('45fb36540e9244daaa21ca409c6bdab3');
25
+
26
+ setState('Hi! 👋🏻');
27
+ ```
28
+
29
+ That's it! 🐙
30
+
31
+ ## API
32
+
33
+ ### Hook
34
+
35
+ - `useHttpState(uuid)`
36
+ Create a reactive state instance of UUIDv4.
37
+ - `uuid`: The UUID v4 string.
38
+
39
+ - Returns `[state, setState]` where:
40
+ - `state`: The current value (undefined | string).
41
+ - `setState`: The set function that lets you update the state to a different value.
42
+
43
+ ---
44
+
45
+ ## About
46
+
47
+ Alex Morales, [moralestapia.com](https://moralestapia.com)
48
+
49
+ Copyright © Alex Morales, 2026
50
+
51
+ ## Contact
52
+
53
+ Comments, feature requests, etc. are welcome at **inbox @ httpstate.com**.
54
+
55
+ ## License
56
+
57
+ Unless otherwise stated in particular files or directories, this software is free software.
58
+
59
+ You can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
60
+
61
+ See [LICENSE](LICENSE) for more information.
package/package.json CHANGED
@@ -29,5 +29,5 @@
29
29
  },
30
30
  "type": "module",
31
31
  "types": "dist/useHttpState.d.ts",
32
- "version": "0.0.13"
32
+ "version": "0.0.15"
33
33
  }