Scan your whole stack
Are you using @bemedev/app-reactjs?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v4.0.2
@bemedev/app-reactjs was last scanned on 30 Nov 2026 at version 4.0.2. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 4.0.2 LATEST | 30 Nov 2026 | No rules fired |
| 4.0.1 | 30 Nov 2026 | No rules fired |
| 4.0.0-beta-03 | 30 Nov 2026 | No rules fired |
| 4.0.0-beta-02 | 28 Nov 2026 | Not shown |
| 4.0.0-beta-01 | 27 Nov 2026 | Not shown |
Findings for v4.0.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 4.0.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
ReactJS state hook binding for @bemedev/app state machines.
@bemedev/app-reactjs provides a lightweight hook to track and select state from a
@bemedev/app interpreter service inside ReactJS component trees.
Check out the live interactive demo on Vercel: https://bemedev-app-reactjs.vercel.app
npm install @bemedev/app-reactjs
# or
pnpm add @bemedev/app-reactjs
Requirements: Node.js ≥ 24 ·
@bemedev/app≥ 2.0.0 · React ≥ 18.0.0
import { interpret } from '@bemedev/app';
import { useService } from '@bemedev/app-reactjs';
import { myMachine } from './my.machine';
const service = interpret(myMachine, { context: { count: 0 } });
service.start();
function MyComponent() {
// `useService` returns the `state`, `can` and `isInside` helpers.
const hooks = useService(service);
// 1. Select a specific slice of context
const count = hooks.state({ selector: s => s.context.count });
// 2. Or track the active state value
const stateValue = hooks.state({ selector: s => s.value });
// 3. Or track the whole state object
const state = hooks.state();
// 4. Reactive event and state hierarchy queries
const canStart = hooks.can('START');
const isInsideIdle = hooks.isInside('idle');
return (
<div>
<p>Count: {count}</p>
<p>State: {JSON.stringify(stateValue)}</p>
<p>Can start: {String(canStart)}</p>
<p>Inside idle: {String(isInsideIdle)}</p>
</div>
);
}
The package also exports useState, useCan, and useIsInside. They accept the
same service object as useService:
import { useCan, useIsInside, useState } from '@bemedev/app-reactjs';
const count = useState(service, { selector: state => state.context.count });
const canIncrement = useCan(service)('INCREMENT');
const isInside = useIsInside(service)('some.state');
useCan and useIsInside return a callable helper exposing .or and .and:
const canLoad = useCan(service).or('FETCH', 'RETRY');
const insideLoading = useIsInside(service).and('authenticated', 'loading');
useService(service)Creates the service helpers that re-render whenever the interpreter transitions, using deep comparison to prevent unnecessary renders.
| Property | Type | Description |
|---|---|---|
state |
(options?: UseStateOptions) => T |
Selects machine state or a context slice. |
can |
(...events: string[]) => boolean |
Checks whether the given event(s) can be accepted (can.or, can.and). |
isInside |
(...states: string[]) => boolean |
Checks whether the machine is inside the given state hierarchies. |
wrap |
(selector, options?) => Component |
Builds a render-prop component receiving the selected state. |
Wrapper |
(props) => ReactNode |
Renders children with the selected state. |
hooks.wrap(selector, options?) returns a component whose children render function
receives the selected state:
function Counter() {
const hooks = useService(service);
const Wrap = hooks.wrap(state => state.context.count);
return <Wrap>{count => <p>Count: {count}</p>}</Wrap>;
}
hooks.Wrapper renders the same selection directly, without an intermediate
component:
function Counter() {
const hooks = useService(service);
return hooks.Wrapper({
selector: state => state.context.count,
children: count => <p>Count: {count}</p>,
});
}
UseStateOptions| Option | Type | Description |
|---|---|---|
selector |
(state: State) => T |
Optional selector function projecting machine state into a sub-state slice. |
equals |
Dequal_F<T> |
Optional equality comparator function comparing previous and next selected state (defaults to deepEqual). |
stateEquals |
Dequal_F<State> |
Optional equality comparator function comparing raw machine state before selection (defaults to deepEqual). |
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.