cra-template-kea-typescript
Version:
The Kea TypeScript template for Create React App.
13 lines (11 loc) • 309 B
text/typescript
import { kea, actions, reducers, path } from 'kea'
import type { headerLogicType } from './headerLogicType'
export const headerLogic = kea<headerLogicType>([
path(['App', 'headerLogic']),
actions({
goFaster: true,
}),
reducers({
speed: [1, { goFaster: (state) => (state + 1) % 5 }],
}),
])