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

Refactor: mini-rx-store: use @mini-rx/common lib #209

Open
spierala opened this issue Mar 9, 2024 · 0 comments · May be fixed by #211
Open

Refactor: mini-rx-store: use @mini-rx/common lib #209

spierala opened this issue Mar 9, 2024 · 0 comments · May be fixed by #211
Assignees
Labels
enhancement New feature or request

Comments

@spierala
Copy link
Owner

spierala commented Mar 9, 2024

Background

The MiniRx Signal Store uses the same concept as the original RxJS-based MiniRx Store. As a result there is a lot of code which can be shared between the two store solutions. For that reason the @mini-rx/common lib was created. @mini-rx/common is already used by the Signal Store.

See here the full public API of @mini-rx/common: https://github.com/spierala/mini-rx-store/blob/master/libs/common/src/index.ts

Task

  • Refactor MiniRx Store (mini-rx-store lib) to make use of the @mini-rx/common lib. Own custom implementations should be replaced with code from @mini-rx/common.
  • All public API of @mini-rx/common should be used by mini-rx-store (if not used directly, at least some code should be re-exported. See the Signal Store exporting some code from @mini-rx/common: https://github.com/spierala/mini-rx-store/blob/master/libs/signal-store/src/index.ts#L24-L42)
  • Signal Store should be used as orientation. In the end Signal Store and MiniRx Store should look quite identical. The main difference is that Signal Store is tailored to Angular Signals and MiniRx Store uses RxJS.

Subtasks

This is a quite large task. But is is definitely possible to create smaller sub-tasks:

Tests

mini-rx-signal store is covered by a lot of unit tests.
The tests will make the refactor relatively safe.

Indeed some tests can also be removed if mini-rx-store code is replaced with @mini-rx/common code.

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

Successfully merging a pull request may close this issue.

2 participants