packages
packages copied to clipboard
Migrate from ES6 classes to prototypes
- It makes bundles larger
- The classes are not classes
- Naming conventions when using classes are "wierd". Especially for imports
- Private things are not realy private. The same goes for protected
- Classes that has properties is complicated to import in webpack or rollup from node modules. Especially, when they are nested in another package
@stylify/nuxt-module
uses@stylify/stylify
. Needs a transformation before import, otherwise it fails - Radonly properties are basically constants. However in classes it can be rasigned...
- Reasigment detection (if variable is reasigned or not) is better for let variable type then for class property.
- Also: https://medium.com/javascript-in-plain-english/please-stop-using-classes-in-javascript-and-become-a-better-developer-a185c9fbede1 and https://reactjs.org/docs/hooks-intro.html
- It's simply a mess