platform icon indicating copy to clipboard operation
platform copied to clipboard

@ngrx/signals: Add `storage` sub-package

Open markostanimirovic opened this issue 2 years ago • 3 comments

Information

Add the @ngrx/signals/storage sub-package that will contain the withStorageSync feature.

The initial implementation is available here: https://github.com/markostanimirovic/ngrx-signal-store-playground/blob/main/src/app/shared/storage-sync.feature.ts

I would be willing to submit a PR to fix this issue

  • [x] Yes
  • [ ] No

markostanimirovic avatar Aug 07 '23 18:08 markostanimirovic

Hi @markostanimirovic I'm willing to support the ngrx team by submitting a PR for the storage feature. It'd be a perfect replacement for a meta reducer I'm using right now with the good old store. I've build a working poc in two variants - as a custom feature implemented in my own app and as a sub-package in a ngrx/platform fork. Event though I got it working I had to use some deep imports from the ngrx/signals main entrypoint which isn't very satisfying.

Would you mind sharing some of your thoughts about the packages features?

bohoffi avatar Dec 03 '23 18:12 bohoffi

@markostanimirovic would be happy to help here, if help is needed.

ducin avatar Feb 07 '24 17:02 ducin

@markostanimirovic I also created an implementation for @ngrx-traits/signals, here https://github.com/gabrielguerrero/ngrx-traits/blob/main/libs/ngrx-traits/signals/src/lib/with-sync-to-web-storage/with-sync-to-web-storage.ts in case anything will be useful, Im happy to help with this too. I also I did lots of other custom storage features , like withCalls that I think could be useful if they were subpackages that I will be happy to colaborate

gabrielguerrero avatar May 03 '24 22:05 gabrielguerrero

I'm going to close this issue as it's not planned for now. It will be revisited later this year.

In the meantime, community plugins can be used for storage synchronization.

markostanimirovic avatar Jul 14 '24 22:07 markostanimirovic