
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
@layers/amba-react
Advanced tools
React hooks for the amba SDK — useAmba, useUser, useCollection, useFlag, and more
React hooks for amba. Companion to @layers/amba-web.
pnpm add @layers/amba-react @layers/amba-web react
import { Amba } from "@layers/amba-web";
import {
AmbaProvider,
useUser,
useCollection,
useFlag,
} from "@layers/amba-react";
// Configure at app start (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",
);
const newUi = useFlag("new_ui");
if (!isAuthenticated) return <SignIn />;
if (loading) return <Spinner />;
return (
<div className={newUi ? "new-ui" : "classic"}>
<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 user has the entitlement. |
useTrackOnMount(event, props) | Side-effect — tracks an event when the component mounts. |
MIT.
FAQs
React hooks for the amba SDK — useAmba, useUser, useCollection, useFlag, and more.
The npm package @layers/amba-react receives a total of 2 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.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

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.