
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
eden-react-query
Advanced tools
Wrapper for Eylsia's Eden to use React Query
npm i eden-react-query
import type { App } from "./path-to-your-elysia";
import { treaty } from "@elysiajs/eden";
import { createClient } from "eden-react-query";
const eden = treaty<App>("http://localhost:3000");
const hooks = createClient(eden);
"use client";
import { hooks } from "@/utils/eden";
export default function HomeClient() {
const countQuery = hooks.count.get.useQuery();
const countMutation = hooks.count.post.useMutation({
onSuccess: () => {
countQuery.refetch();
},
});
return (
<main>
<button onClick={() => countMutation.mutate()}>Click me</button>{" "}
{countQuery.data ? countQuery.data.count : "Loading..."}
</main>
);
}
import HomeClient from "./page.client";
import { HydrationBoundary } from "@tanstack/react-query";
import { createUtils } from "eden-react-query/server";
import { eden } from "@/utils/eden";
export default async function Home() {
const utils = createUtils(eden);
await utils.count.get.prefetch();
return (
<HydrationBoundary state={utils.dehydrate()}>
<HomeClient />
</HydrationBoundary>
);
}
Refer to Elysia and React Query documentation for more information.
FAQs
Wrapper for Eylsia's Eden to use React Query
We found that eden-react-query demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.