Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

RFC: Add source to createSelection #19

@Kelin2025

Description

@Kelin2025

Case

Currently createSelection doesn't support source. But sometimes you need to filter stuff based on some dynamic proprties
There's createSwitch but it doesn't cover all cases

Solution

Add source to createSelection

const $users = createListApi({ ... })

const $valueTreshold = createStore(10)

const $richUsers = createSelection($users, {
  source: $valueTreshold,
  fn: (user, treshold) => user.ethValue >= treshold
})

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions