Realize the app size benefit for Authentication before continuing. Optional: at this point, remove the Authentication compat library and compat code.Refactor code for a single product (for example, Authentication) to.Update import statements in your code to compat.Add the modular libraries and the compat libraries to your app.Source for your app and then compile and run it without breakage. About the upgrade processĮach step of the upgrade process is scoped so that you can finish editing the If you are upgrading such an app, you can follow the instructions in this guideįor "the modular API" without using the compat libraries. Practical to refactor older namespaced code without using the compat libraries. Your ultimate goal is to remove compat codeĪnd keep only the modular-style code in your app.įor apps with a very small exposure to the Firebase Web SDK-for example,Īn app that makes only a simple call to the Authentication APIs-it may be Solution that will be removed completely in a future major SDK version (suchĪs version 10 or version 11). Keep in mind: the compat libraries are a temporary This means youĬan compile and debug your app more easily as you work through the upgrade Using namespaced code alongside code refactored for the modular API. This guide assumes that you will take advantage of the compat Compat libraries have little toĪdvantages over their namespaced counterparts. Namespaced ( compat) - a familiar API surface which is fullyĮarlier versions of the SDK, allowing you to upgrade without changing all.Make your web app as small and fast as possible. Modular - a new API surface designed to facilitate tree-shaking.There are two types of libraries available for the Firebase Web SDK: By working through the examples, youĬan master the concepts and practical steps required to upgrade all supportedįirebase Web SDKs. Uses the Authentication and Cloud Firestore SDKs. The upgrade steps in this guide will be based around an imaginary web app that The modular API's main benefits in reduced app size. If you don't use one, you won't be able to take advantage of Using a module bundler in your development environment is strongly That you are familiar with the namespaced API and that you will take advantage of a Migrating to the modular API using the instructions in this guide. Connect to the Cloud Functions emulatorĪpps currently using any namespaced Firebase Web API, from the compat librariesīack through version 8 or earlier, should consider.Connect to the Cloud Storage for Firebase emulator.Connect to the Realtime Database emulator.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |