Skip to content

[FR] Add a function that initializes an App or returns existing one #2314

Open
@arayaryoma

Description

@arayaryoma

Is your feature request related to a problem? Please describe.
A function initializeApp throws an error if the app is already existed at the time. As current workaround, we need to handle thrown error.
(related: #2111 )

Describe the solution you'd like
Add a function wrapping initializeApp and getApp, that returns existing FirebaseApp, or initialize a new FirebaseApp if the app doesn't exist.

my sample implementation: arayaryoma@65be170

Describe alternatives you've considered
Not yet

Additional context
If this proposal is affirmed, I can open a PullRequest.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions