
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@layers/amba-react
Advanced tools
React hooks for the amba SDK — useAmba, useUser, useCollection, useFlag, and more.
Amba is the agent-native backend-as-a-service for mobile and web apps. This package is the React hooks layer — companion to @layers/amba-web.
npm install @layers/amba-react@1.0.1 @layers/amba-web@1.0.1 react
import { Amba } from "@layers/amba-web";
import { AmbaProvider, useUser, useCollection } from "@layers/amba-react";
// Configure once, before render.
await Amba.configure({ apiKey: import.meta.env.VITE_AMBA_API_KEY });
function App() {
return (
<AmbaProvider>
<Inner />
</AmbaProvider>
);
}
function Inner() {
const { user, isAuthenticated } = useUser();
const { data: todos, loading } = useCollection<{ id: string; title: string }>(
"todos",
);
if (!isAuthenticated) return <SignIn />;
if (loading) return <Spinner />;
return (
<div>
<p>Welcome {user?.display_name}</p>
<ul>{todos?.map((t) => <li key={t.id}>{t.title}</li>)}</ul>
</div>
);
}
| Hook | Returns |
|---|---|
useAmba() | Raw SDK handle. |
useUser() | { user, isAuthenticated, loading }. |
useCollection(name, options) | { data, loading, error, refetch, response }. |
useFlag(name) | boolean. |
useVariant(name) | string | null (multi-variant flag assignment). |
useEntitlement(name) | boolean — true if the user has the entitlement. |
useTrackOnMount(event, props) | Side effect — tracks the event on mount. |
Full reference: https://docs.amba.dev/sdk/react.
MIT
FAQs
React hooks for the amba SDK — useAmba, useUser, useCollection, useFlag, and more.
The npm package @layers/amba-react receives a total of 0 weekly downloads. As such, @layers/amba-react popularity was classified as not popular.
We found that @layers/amba-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.