userStore

Listens the current Firebase user.

Parameters

  • auth - Firebase Auth instance

Example

<script>
    import { userStore } from 'sveltefire';
    import { auth } from '$lib/firebase'; // your firebase auth instance

    const user = userStore(auth);
</script>

Hello {$user.uid}