Comments (6)
I updated the RFC description with more details:
- The
withProps
factory function would accept previously defined state signals, computed signals, and properties. withComputed
,withMethods
, andwithHooks
would accept previously defined properties.
from platform.
This would be useful!
Can props be private the same way state/computed/methods are?
from platform.
Yes, that would be an addition, we definitely should have. Just two questions:
- Do we now have constraints for the property type, or can it be anything?
- You stated that the factory function gets the existing slices and computeds. I guess it would also get the previous props? Why do we not pass the methods as well?
from platform.
As suggested something like this last week on discord when talking with @rainerhahnekamp. It would be super useful to open many new capabilities and to avoid hacks with Proxy
applied on method in withMethods
.
Are there any more details about limitations and where those props would be exposed? I'm hopping to have access to them in withComputed
.
from platform.
IMO it makes a lot of sense when integrating with libs/things from outside of angular ecosystem, which don't fit any of existing withState, withComputed etc.
The only thing which bothers me is the name - withProps
. The "property" word doesn't outline what is the key here - being static. How about withStatic
?
from platform.
@ducin thats why I also proposed alternative name withExplicit
Edited: Ahhh it was in other discussion
from platform.
Related Issues (20)
- New Signals rule @ngrx/prefer-protected-state HOT 6
- NgRx signalStoreFeature issue after upgrade from version 17 to 18 HOT 8
- Types of property '[STATE_SOURCE]' are incompatible error when testing using `patchState` after v18 upgrade HOT 1
- Missing @angular/core peerDependency within store-devtools HOT 1
- Migrating from v17 to v18 causes typing issues in reducer with extraSelectors HOT 4
- @ngrx/signals: Compilation problem with publishable Libs due to STATE_SOURCE HOT 10
- Update Footer: Change Twitter to X. HOT 1
- @ngrx/signals DeepSignal not created when patching state HOT 4
- Creating a signal store using anything more than initialState hides all signals and exposed methods HOT 2
- Typings: Signals inside a DeepSignal of a type with optional properties are marked as optional. HOT 2
- (feat): Extend SignalsDictionary and MethodsDictionary HOT 1
- Add documentation for the ESLint rule signal-state-no-arrays-at-root-level
- Add documentation for the ESLint rule signal-store-feature-should-use-generic-type HOT 6
- @ngrx/signals: withProperties feature HOT 3
- ESLint rule: require-super-ondestroy HOT 1
- Migrate our pipelines HOT 3
- Use function instead of class in really the best solution? HOT 1
- Facilitate Garbage Collection with weak refs in Angular Universal / SSR
- Unable to appropriately mock a SignalStore when its within the `providers` array of the standalone component being tested
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platform.