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

Fixes effects issues with direct obj assingment #245

Conversation

suresh-gangumalla
Copy link
Collaborator

When complete object is assiged to state variable with equal operator then effects associated with in template on assining object properties are not triggering.

Here Object.assign is working as expected but users feels this is odd to do instead of assignment operator

Moved the object.assign operation to reactive proxy set trap so that it will invoke set traps of indiviual key

When complete object is assiged to state variable with equal operator
then effects associated with in template on assining object properties
are not triggering.

Here Object.assign is working as expected but users feels this is odd
to do instead of assignment operator

Moved the object.assign operation to reactive proxy set trap so that
it will invoke set traps of indiviual key

Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
suresh-gangumalla and others added 2 commits December 26, 2024 11:18
Object.assing is only required for pure objects as arrays
direct assignment is triggering effects without an issue

Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
@suresh-gangumalla
Copy link
Collaborator Author

Latest Changes are working as expected for object direct assignment.

@michielvandergeest michielvandergeest merged commit e58f70b into lightning-js:dev Jan 6, 2025
1 check 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.

2 participants