ngxs-labs / attach-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get the entire State in anonymous functions

seiyria opened this issue · comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:

Current behavior

Right now, if I wanted to get the entire state, I would need to not use an anonymous function and instead attach the function to a class that has access to Store.

Expected behavior

I would like a way to get the entire state for when I need to do cross-state things. Otherwise, I need to do awkward things like have some of the functions attached, and some of them on the state.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

This would let users continue to fully utilize anonymous functions instead of having to do a hybrid approach.

Environment


Libs:
- @angular/core version: ^15.0.0
- @ngxs/store version: ^3.7.6


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others: