8000 withRegion + clearNode incorrectly clears not related sample targets · Issue #1200 · effector/effector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

withRegion + clearNode incorrectly clears not related sample targets #1200

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

Closed
velialiev opened this issue Dec 13, 2024 · 2 comments · Fixed by #1225
Closed

withRegion + clearNode incorrectly clears not related sample targets #1200

velialiev opened this issue Dec 13, 2024 · 2 comments · Fixed by #1225
Labels
bug Something isn't working core effector package

Comments

@velialiev
Copy link

What is the current behavior:

Removing region using clearNode removes not only relations with region units but with any other units that are used in the same sample target array as them

Please provide the steps to reproduce and if possible a minimal demo of the problem via https://share.effector.dev, https://codesandbox.io or similar

https://share.effector.dev/CfOXurO3

  1. Create unit A in region R
  2. Create unit B outside of a region R
  3. Create sample outside of a region R with any clock C and target [A, B]
  4. Clear region R
  5. Trigger clock C
  6. Both units A and B are not triggered

What is the expected behavior:

Expected unit B to be triggered since it and sample should not be cleared with region R

Which versions of effector packages, and which browser and OS are affected by this issue? Did this work in previous versions of effector?:

23.2.3

@velialiev velialiev added bug Something isn't working needs triage labels Dec 13, 2024
@zerobias zerobias added core effector package and removed needs triage labels Jan 24, 2025
@zerobias
Copy link
Member

Issue looks very insidious and not easy to fix. In a meantime I suggest to use only one target per sample call when target is a unit from withRegion

@zerobias
Copy link
Member
zerobias commented Feb 1, 2025

This was one of the most challenging graph problems I've ever dealt with in my life 🫠
I had to significantly redo the logic, so if you find any more bugs, let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core effector package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0