DEV Community

Discussion on: Let's talk about an unnecessary but popular Vue plugin

Collapse
 
nektro profile image
Meghan (she/her)

While I would typically agree that a plugin for such a use case, the second block of code is much more in line with how I would want the code to look, from a code quality perspective. Dynamically modifying a prototype you dont control in a system that doesnt actively type check or error/warn for overwriting these properties is a lot worse than the flow of having an extension and registering it to the global object.