techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.7K
active users

#ngrx

0 posts0 participants0 posts today

NgRx SignalStore: An effortless solution for state management by Abdelfattah Ragab

This book is being published today and is not yet available anywhere online except on the author's website. It has been submitted to other book publishers, but it will be some time before you can buy it anywhere else.
The e-book is only available on the author's website books.abdelfattah-ragab.com with amazing discounts of up to 40%.

I've been pondering about creating EventSourcing, CQRS & DDD scaffolding from scratch in TypeScript.

There doesn't seem to be an OpenSource basic scaffolding for this using RxJS? ( I mean the basic bang like NgRx ).

DDD -> NgRx
- Command -> Action ( in imperative )
- Command Handler -> Effect
- Domain Event -> Action ( in past tense )
- Aggregate state -> a Store entry
- Aggregate state's apply -> Reducer

Did I get this right?

🗺️ The @ngworker/router-component-store 15.0.0-rc.0 prerelease has been published
github.com/ngworker/router-com

- Local router stores match ActivatedRoute more closely (breaking changes to currentRoute$)
- The optional type parameter has been removed from RouterStore#selectRouteData
- Strict and immutable state:
- Route data
- Route parameters
- Query parameters

A migration guide is in the release notes.
#OpenSource #Angular #NgRx

After using Data Binding, BehaviourSubjects and Component Store, we moved most of our state into an ngrx Store. Although it might seem heavyweight, its design is very sophisticated and superior to all other state stores due to the concept of actions. This helps in very complex scenarios to maintain sanity, separation of concerns and allows to write isolated tests.

#Angular#ngrx#state

#angular #ngrx #signalstore #typescript

I'm at the beginning of experimenting with the ngrx signalStore and it's fascinating! But if you want to write own extensions which should support "naming" like the "withEntities" extension of ngrx (add multiple instances of the extension to a store with different prefixes) you have to jump through some TypeScript hoops if you want typesafety and good code completion.

Here are my helpers:
gist.github.com/flensrocker/a7

@angular
@rainerhahnekamp
@LayZee

GistHelper types and functions for mapping state etc. to "named state" for @ngrx/signalStore extensions like "withEntities". Example "withError" extension included.Helper types and functions for mapping state etc. to "named state" for @ngrx/signalStore extensions like "withEntities". Example "withError" extension included. - obje...

Can I ask about how to approach accessing navigation in component-store. I want to access a param in the URL from the component-store and I’m currently doing it by using the `bindToComponentInputs` to get the param from the url and then passing it as a parameter to the effect. Does this seem right? Should I just be accessing the routing in the component store by injecting the ActivatedRoute instead and subscribing to it? #NgRx #NgRxComponentStore #Router