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

fix(signals): run rxMethod outside of reactive context #4224

Merged
merged 7 commits into from Jan 31, 2024

Conversation

rainerhahnekamp
Copy link
Contributor

@rainerhahnekamp rainerhahnekamp commented Jan 31, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

It looks like the latest refactoring in rxMethod (fa45d92) causes it now to run inside an effect. Practically, every withMethods
which uses rxMethod cannot call patchState anymore.

I've added two tests. Once you use the new version of rxState from the main branch, you will see that these tests will fail.

Closes #

What is the new behavior?

I played safe and reverted back to the old version. Maybe one can find a better alternative.

Does this PR introduce a breaking change?

[] Yes
[ ] No

Other information

Copy link

netlify bot commented Jan 31, 2024

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit c83ab43
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/65babaa63893660008246931

@rainerhahnekamp rainerhahnekamp changed the title fix(signals): refactoring of rxMethod causes NG0600 (runs in effect) fix(signals): run rxMethod in untracked context Jan 31, 2024
@markostanimirovic markostanimirovic changed the title fix(signals): run rxMethod in untracked context fix(signals): run rxMethod outside of reactive context Jan 31, 2024
@alex-okrushko alex-okrushko merged commit 3a691d9 into ngrx:main Jan 31, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants