Skip to main content

useActions

Assure the logic is mounted and fetch actions from the logic.

import { kea, useActions } from 'kea'

const logic = kea([])

function MyComponent() {
const { increment } = useActions(logic)

return <button onClick={increment}>Increment</button>
}

Questions & Answers

Ask questions about this page here.