[core][Slider] Ref immutable consistency #227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make it trigger as an immutable ref, for consistency with the rest of the codebase.
To be fair, I don't know if this PR (Option A) is the right long-term decision. We have two other options:
Option B
Option C
I started a bit this with @romgrk in mui/mui-x#11847 (review).
In any case, for now, I'm going with the consistency path, defaulting to what the rest of the codebase is doing. It makes it easier to learn and update things at scale. It feels to me that:
So I land on going with mui/mui-x#11847 (comment) for the none refs because who cares about the null/undefiend difference. Going with Option A for DOM refs to things simple for the rest. If this is OK, I can open an issue. It probably doesn't matter much what we pick, as long as it's consistent.