Skip to main content

useAllValues

Similar to useValues, but eagerly selects all the values in the logic and stores their current state in an object.

import { kea, useAllValues } from 'kea'

const logic = kea([])

function MyComponent() {
const values = useAllValues(logic)

return (
<div>
{values.counter} * 2 = {values.doubleCounter}
</div>
)
}

Questions & Answers

Ask questions about this page here.