Skip to content

refactor: Less error prone _value in Mutables. #6311

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

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

tjzel
Copy link
Collaborator

@tjzel tjzel commented Jul 22, 2024

Summary

At the moment the _value property is an ordinary property, which makes it visible via Object.keys or const prop in sv. This way sometimes when it's accidentally passed to React it throws errors and we had to add troubleshooting for that.

This PR makes it so it would be hidden via enumerable: false.

Test plan

  • Runtime tests pass.

@tjzel tjzel force-pushed the @tjzel/less-error-prone-_value branch from b27afde to a2b44cc Compare July 23, 2024 07:30
Copy link
Contributor

@Latropos Latropos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement!

@tjzel tjzel added this pull request to the merge queue Aug 23, 2024
Merged via the queue into main with commit fe5e5e7 Aug 23, 2024
8 checks passed
@tjzel tjzel deleted the @tjzel/less-error-prone-_value branch August 23, 2024 14:06
tjzel added a commit that referenced this pull request Aug 28, 2024
## Summary

At the moment the `_value` property is an ordinary property, which makes
it visible via `Object.keys` or `const prop in sv`. This way sometimes
when it's accidentally passed to React it throws errors and we had to
add troubleshooting for that.

This PR makes it so it would be hidden via `enumerable: false`.

## Test plan

- [x] Runtime tests pass.
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