@bemedev/app-reactjs 1.9.2 → 1.9.3

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 +17 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -58,6 +58,23 @@ function MyComponent() {
58
58
 
59
59
  <br/>
60
60
 
61
+ ## Available Hooks
62
+
63
+ The package also exports `useState`, `useCan`, and `useIsInside` for common
64
+ state selection patterns:
65
+
66
+ ```typescript
67
+ const count = useState(service, state => state.context.count);
68
+ const canIncrement = useCan(service, 'INCREMENT');
69
+ const isInside = useIsInside(service, 'some.state');
70
+ ```
71
+
72
+ These helpers are designed to work with the same interpreter service and
73
+ provide a lightweight way to subscribe to state slices, transition
74
+ permissions, and nested state location checks.
75
+
76
+ <br/>
77
+
61
78
  ## API Reference
62
79
 
63
80
  ### `useService(service, options?)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bemedev/app-reactjs",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "Middleware between @bemedev/app and reactjs",
5
5
  "keywords": [
6
6
  "app",
@@ -57,7 +57,7 @@
57
57
  "@vitest/coverage-v8": "^4.1.10",
58
58
  "@vitest/ui": "4.1.10",
59
59
  "glob": "^13.0.6",
60
- "globals": "^17.8.0",
60
+ "globals": "^17.9.0",
61
61
  "husky": "^9.1.7",
62
62
  "jsdom": "^30.0.1",
63
63
  "onchange": "^7.1.0",
@@ -71,15 +71,15 @@
71
71
  "rolldown-plugin-dts": "^0.28.0",
72
72
  "size-limit": "^13.0.3",
73
73
  "tslib": "^2.8.1",
74
- "tsx": "^4.23.1",
74
+ "tsx": "^4.23.4",
75
75
  "typescript": "^6.0.3",
76
76
  "vitest": "^4.1.10",
77
- "@bemedev/app": "^1.9.1",
78
- "@bemedev/app-vitest": "^1.9.1"
77
+ "@bemedev/app": "^1.9.3",
78
+ "@bemedev/app-vitest": "^1.9.3"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "react": "^19.2.8",
82
- "@bemedev/app": "^1.9.1"
82
+ "@bemedev/app": "^1.9.3"
83
83
  },
84
84
  "size-limit": [
85
85
  {