
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
 [](https://www.typescriptlang.org/)
React state management library Based on Hooks
Hisoka is opinionated, it has these benefits:
connect、mapState
npm i hisoka
import { createStore } from 'hisoka'
const { useSelector, dispatch, Provider } = createStore({
state: {
count: 0,
},
actions: {
increment(state, payload: number) {
state.count += payload;
},
decrement(state, payload: number) {
state.count -= payload;
},
async asyncIncrement(state, payload: number) {
await new Promise(resolve => {
setTimeout(() => {
state.count += payload;
resolve()
}, 1000)
})
dispatch.increment(payload);
},
}
})
const Counter = () => {
const count = useSelector(S => S.count)
return (
<div>
<span>{count}</span>
<div>
<button onClick={() => dispatch.decrement(1)}>-</button>
<button onClick={() => dispatch.increment(1)}>+</button>
<button onClick={() => dispatch.asyncIncrement(1)}>async+</button>
</div>
</div>
)
}
See /example
The initial state of a store
const someStore = createStore({
state: {
count: 0,
},
})
Update state in actions
const { dispatch } = createStore({
actions: {
increment(state, payload) {
state.count += payload
},
async asyncIncrement() {
await new Promise((resolve, reject) => {
setTimeout(() => {
resolve()
}, 1000)
})
dispatch.increment(1)
},
},
})
Get state in React component using hooks
const App = () => {
const { useSelector } = counterStore
const count = useSelector(S => S.count)
return <span>{count}</span>
}
Dispatch an Action to update state
const { useSelector, dispatch } = counterStore
const Count = () => {
const count = useStore(S => S.count)
return (
<div>
<span>{count}</span>
<button onClick={() => dispatch.increment(1)}>-</button>
<button onClick={() => dispatch.decrement(1)}>+</button>
</div>
)
}
FAQs
 [](https://www.typescriptlang.org/)
The npm package hisoka receives a total of 6 weekly downloads. As such, hisoka popularity was classified as not popular.
We found that hisoka demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.