
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@context-action/jotai
Advanced tools
Jotai integration for @context-action/core - Atomic state management with type-safe actions
Context 내에서 Jotai atom을 공유하기 위한 헬퍼 라이브러리입니다.
이 패키지는 React Context를 통해 Jotai atom을 컴포넌트 트리에서 공유할 수 있도록 도와줍니다. 전역 상태 관리 없이도 특정 컴포넌트 트리 범위 내에서 상태를 격리하고 관리할 수 있습니다.
npm install @context-action/jotai
# 또는
pnpm add @context-action/jotai
import { createAtomContext } from '@context-action/jotai'
// 초기값과 함께 atom context 생성
const { Provider, useAtomState, useAtomReadOnly, useAtomSetter } = createAtomContext(0)
function App() {
return (
<Provider>
<Counter />
<Display />
</Provider>
)
}
function Counter() {
const [count, setCount] = useAtomState()
return (
<button onClick={() => setCount(count + 1)}>
Count: {count}
</button>
)
}
function Display() {
const count = useAtomReadOnly()
return <div>Current count: {count}</div>
}
createAtomContext<T>(initialValue: T)주어진 초기값으로 atom context를 생성합니다.
반환값:
Provider: atom을 제공하는 Context Provider 컴포넌트useAtomContext: Context 접근을 위한 기본 hookuseAtomState: atom 값과 setter를 모두 반환하는 hookuseAtomReadOnly: atom 값만 반환하는 읽기 전용 hookuseAtomSelect: atom 값의 일부를 선택하여 반환하는 hookuseAtomSetter: atom setter만 반환하는 hookuseAtomState()atom의 현재 값과 setter 함수를 반환합니다.
const [value, setValue] = useAtomState()
useAtomReadOnly()atom의 현재 값만 반환합니다 (읽기 전용).
const value = useAtomReadOnly()
useAtomSelect<R>(callback: (item: T) => R)atom 값의 특정 부분을 선택하여 반환합니다.
const userName = useAtomSelect(user => user.name)
useAtomSetter()atom의 setter 함수만 반환합니다.
const setValue = useAtomSetter()
interface User {
id: number
name: string
email: string
}
const { Provider, useAtomState, useAtomSelect } = createAtomContext<User>({
id: 0,
name: '',
email: ''
})
function UserProfile() {
const userName = useAtomSelect(user => user.name)
const userEmail = useAtomSelect(user => user.email)
return (
<div>
<h1>{userName}</h1>
<p>{userEmail}</p>
</div>
)
}
const CounterContext = createAtomContext(0)
const UserContext = createAtomContext({ name: '', age: 0 })
function App() {
return (
<CounterContext.Provider>
<UserContext.Provider>
<MyComponent />
</UserContext.Provider>
</CounterContext.Provider>
)
}
MIT
FAQs
Jotai integration for @context-action/core - Atomic state management with type-safe actions
We found that @context-action/jotai demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.