-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Dispense with View#options merging. #2461
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
Conversation
|
Yeah, I like this change - objects or arrays directly on the prototype should generally be discouraged anyway. |
Dispense with View#options merging.
It seems like the reason for dropping If I have that correct, the desire for a consistent API makes a lot of sense. However, I think there are two points that are worth bringing up that weren't considered:
I'm happy to create a pull request that does this. |
The Also that way you can revert the Don't forget to add at the end of your constructor |
As discussed in #2458, using defaults is unnecessary when attaching options directly to new instances.
For example, this code
is better written as and functionally equivalent to
With that in mind, there is really no need for merging options with
View#options
.