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

RFC: Add source to createSelection #19

Open
Kelin2025 opened this issue Jul 7, 2023 · 0 comments
Open

RFC: Add source to createSelection #19

Kelin2025 opened this issue Jul 7, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kelin2025
Copy link
Member

Kelin2025 commented Jul 7, 2023

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
})
@Kelin2025 Kelin2025 self-assigned this Jul 7, 2023
@Kelin2025 Kelin2025 added the enhancement New feature or request label Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant