keajs / kea

Batteries Included State Management for React
https://keajs.org/
MIT License
1.94k stars 51 forks source link

Logic prop selectors #151

Closed mariusandra closed 1 year ago

mariusandra commented 1 year ago

Adds support for the following

const logic = kea([
  props({} as { id: number }),
  selectors({
    duckAndChicken: [
      (s, p) => [s.duckId, s.chickenId, p.id],
      (duckId, chickenId, id) => duckId + chickenId + id,
    ],
  })
])