2.5.1 • Published 3 months ago

@ngneat/elf v2.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Elf

A Reactive Store with Magical Powers

Elf is a reactive immutable state management solution built on top of RxJS. It uses custom RxJS operators to query the state and pure functions to update it.

Elf encourages simplicity. It saves you the hassle of creating boilerplate code and offers powerful tools with a moderate learning curve, suitable for experienced and inexperienced developers alike.

 Modular by design
 Tree Shakeable & Fully Typed
 CLI
 First Class Entities Support
 Requests Status & Cache
 Persist State
 State History
 Pagination
 Devtools

@ngneat/elf commitizen PRs coc-badge semantic-release styled with prettier

🤓 Learn about it on the docs site

👩‍🎓 Check out the React Todos example

😋 Check out the Angular Todos example or Books example

import { createStore, withProps, select, setProp } from '@ngneat/elf';
import { withEntities, selectAllEntities, setEntities } from '@ngneat/elf-entities';

interface TodosProps {
  filter: 'ALL' | 'ACTIVE' | 'COMPLETED';
}

interface Todo {
  id: string;
  title: string;
  status: string;
}

const store = createStore(
  { name: 'todos' },
  withProps<TodosProps>({ filter: 'ALL' }),
  withEntities<Todo>()
);

export const filter$ = store.pipe(select(({ filter }) => filter));
export const todos$ = store.pipe(selectAllEntities());

export function setTodos(todos: Todo[]) {
  store.update(setEntities(todos));
}

export function updateFilter(filter: TodosProps['filter']) {
  store.update(setProp('filter', filter));
}

🗒️ Review the Change Logs

⭐ Usage Trend of Elf Packages

Usage Trend of Elf Packages

2.5.1

3 months ago

2.5.0

4 months ago

2.4.0

8 months ago

2.3.2

11 months ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.6

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.1

3 years ago

1.0.0-beta.0

3 years ago