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 duplicate DPR call #404

Open
sfroment opened this issue Jan 27, 2025 · 0 comments · May be fixed by #432
Open

Fix duplicate DPR call #404

sfroment opened this issue Jan 27, 2025 · 0 comments · May be fixed by #432
Assignees
Labels
bug Something isn't working

Comments

@sfroment
Copy link
Contributor

Right now since we don't return on callFn here https://github.com/topology-foundation/ts-drp/blob/226868a7716f826ccfa6e070a604169eaa11d4fe/packages/object/src/index.ts#L178-L180.
Any DRP method will be called twice increase by x2 the computation of any DRP.
Cause later on in the callFn we will have this https://github.com/topology-foundation/ts-drp/blob/226868a7716f826ccfa6e070a604169eaa11d4fe/packages/object/src/index.ts#L371-L375 which will call your DRP method.
Then we will call the Reflect.apply which itself will call the same function.
Instead we shall be propagating the state we already pre computed if it has changed

@sfroment sfroment added the bug Something isn't working label Jan 27, 2025
@github-project-automation github-project-automation bot moved this to 🔮 Backlog in DRP Jan 27, 2025
@hoangquocvietuet hoangquocvietuet linked a pull request Feb 5, 2025 that will close this issue
@hoangquocvietuet hoangquocvietuet self-assigned this Feb 5, 2025
@hoangquocvietuet hoangquocvietuet moved this from 🔮 Backlog to 👀 Review in DRP Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants