
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@gdjiami/hooks
Advanced tools
A collection for React Hooks
yarn add @gdjiami/hooks -D
#or
npm i @gdjiami/hooks --save-dev
import React, { useState } from 'react'
import {
useToggle,
useOnMount,
useOnUnmount,
useOnUpdate,
} from '@gdjiami/hooks'
export const Countter = () => {
const [open, toggleOpen] = useToggle(true)
const [counter, setCounter] = useState(0)
useOnMount(() => {
console.log('mounted')
})
useOnUpdate(() => {
console.log('counter update:', counter)
}, counter)
useOnUnmount(() => {
console.log('will unmount')
})
return (
<div>
<button onClick={toggleOpen}>{open ? 'on' : 'off'}</button>
{open && (
<div>
<div>counter: {counter}</div>
<div>
<button onClick={() => setCounter(counter + 1)}>increase</button>
<button onClick={() => setCounter(counter + 1)}>decrease</button>
</div>
</div>
)}
</div>
)
}
FAQs
react hooks for mygzb.com
We found that @gdjiami/hooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.