FirebaseApp
Puts the Firebase app into Svelte’s context. It should be used as a parent to all other SvelteFire components.
Props
firestore
- Firebase Auth instanceauth
- Firestore instancestorage
- Storage instancertdb
- RealtimeDB instanceanalytics
- Firebase Analytics instance
Example
Initialize Firebase with the SDKs you need in your app, then pass them to FirebaseApp
as props.
<script>
import { FirebaseApp } from 'sveltefire';
import { initializeApp } from 'firebase/app';
import { getFirestore } from 'firebase/firestore';
import { getAuth } from 'firebase/auth';
// Initialize Firebase
const app = initializeApp(/* your firebase config */);
const firestore = getFirestore(app);
const auth = getAuth(app);
</script>
<FirebaseApp {auth} {firestore}>
<slot />
</FirebaseApp>