Awesome
<p align="center"> <img width="20%" height="20%" src="elf.png"> </p>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
Sponsoring ngneat
Sponsorships aid in the continued development and maintenance of ngneat libraries. Consider asking your company to sponsor ngneat as its core to their business and application development.
Gold Sponsors
Elevate your support by becoming a Gold Sponsor and have your logo prominently featured on our README in the top 5 repositories.
Silver Sponsors
Boost your backing by becoming a Gold Sponsor and enjoy the spotlight with your logo prominently showcased in the top 3 repositories on our README.
Bronze Sponsors
<a href="https://houseofangular.io" target="_blank"> <img src="https://github.com/ngrx/platform/blob/main/projects/ngrx.io/src/assets/images/sponsors/house-of-angular.png" width="50px" height="50px" alt="House of Angular" /> </a>Become a bronze sponsor and get your logo on our README on GitHub.
<hr /> <p align="center"> </p>🤓 Learn about it on the docs site
👩🎓 Check out the React Todos example
😋 Check out the Angular Todos example or Books example
<br >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
@ngneat/elf
@ngneat/elf-cli
@ngneat/elf-devtools
@ngneat/elf-entities
@ngneat/pagination
@ngneat/persist-state
@ngneat/requests
@ngneat/state-history