Home > Software design >  What is going on with new Google's Web 9 "Modular" syntax vs previous Web 8"Name
What is going on with new Google's Web 9 "Modular" syntax vs previous Web 8"Name

Time:09-21

so I wanted to ask why is Google's new Web ver 9 "Modular" syntax better than Web 8 "Namespaced" syntax?

I think it brings a lot of confusion right now seeing all the stuff getting changed at least in my eyes right now - and I really can't grasp the idea behind this change.

I specifically refer to this question firebase__webpack_imported_module_2__.auth.createuserwithemailandpassword is not a function.? , where in the comment section I ask specifically that.

Is the modularity really worth the fuss and also why is this syntax createUserWithEmailAndPassword(auth, email, password) (I assume it involves dependency injection) better than previous auth.createUserWithEmailAndPassword(email, password), and if so why? Thanks for answers ;x

CodePudding user response:

The main goal of the new v9 API surface is to facilitate tree-shaking (removal of unused code) to make your web app as small and fast as possible.

You can also watch the following Firebase video: https://www.youtube.com/watch?v=r5eJQ3nPc6A

  • Related