Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity management #69

Open
spierala opened this issue Jan 14, 2022 · 0 comments
Open

Entity management #69

spierala opened this issue Jan 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@spierala
Copy link
Owner

spierala commented Jan 14, 2022

It would be cool to make the management of entity data (collections of data: e.g. Products, Todos) more straight forward in MiniRx.
Currently the immutable updates of entities require quite some boilerplate code.

Existing solutions:

MiniRx Entity state:

MiniRx has two APIs to manage state... both need to be able to manage entities and if possible many entities in one feature state.

  • Redux API: NgRx entitiy adapter could be a good fit in general
  • FeatureStore, ComponentStore API: the entity adapter could be used there as well
  • Maybe a new thing: Entity Feature Store: extends Feature Store but sets up an entityAdapter internally. Here we would just manage one entity per Entity Feature Store

Challenge:

  • Investigate existing entity state management solutions
  • Add support for entity management in the Redux and the FeatureStore/ComponentStore API
  • Create EntityFeatureStore: manage (probably) just one entity but with a minimum of boilerplate

Notes

API

Regarding the naming of functions which update entity state: Most probably we should use similar/identical names like NgRx entityAdapter, Akita EntityStore or Elf. These names are known by developers.

New lib?

Should "MiniRx Entity" be part of the mini-rx-store lib or should it be a dedicated lib? Or is maybe a second entry point in mini-rx-store good enough (for tree-shaking)?

@spierala spierala added the enhancement New feature or request label Jan 14, 2022
@spierala spierala changed the title MiniRx entity management Entity management Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant