Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 778 Bytes

README.md

File metadata and controls

45 lines (36 loc) · 778 Bytes

☄️ Effector FSP

flowchart LR
  subgraph Combine
    direction LR
    Filter --> Sort
    Sort --> Paginate
  end
  Data -.-> Combine
  Combine -.-> FSP
Loading
const $todos = createStore<Todo[]>([]);

Filter

const filters = createFilters($todos, (todo, field, value) =>
  String(todo[field]).toLowerCase().includes(value.toLowerCase())
);

Sort

const sorting = createSorting({
  $allRecords: filters.$filtredRecords,
  comparator: todoComparator,
  initialField: 'id' as keyof Todo,
  initialOrder: 'desc',
});

Paginate

const pagination = createPagination(sorting.$sortedRecords, 10);