
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
gongo-client-react
Advanced tools
React hooks for gongo-client
Copyright(c) 2020 by Gadi Cohen dragon@wastelands.net. MIT licensed.
Main project page https://github.com/gongojs/project
import React from 'react';
import { useGongoLive } from 'gongo-client-react';
function App() {
// That's it. The component will update on any relevant change.
const data = useGongoLive( () => db.collection('test').find() );
return (
<ol>
{ data.map(row => <li><code>{JSON.strinigfy(row)}</code></li> }
</ol>
);
}
LiveQuery on a result set, returns an array.
Example:
const data = useGongoLive( db => db.collection('test').find() );
LiveQuery for a single result.
Example:
const user = useGongoOne( db => db.collection('users').find({ _id: userId }) );
LiveQuery on current userId... non-null if user is logged in.
// const opts = {
// db: force a specific database
// };
const userId = useGongoUserId(/* opts */);
FAQs
React hooks for GongoJS gongo-client
The npm package gongo-client-react receives a total of 15 weekly downloads. As such, gongo-client-react popularity was classified as not popular.
We found that gongo-client-react 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.