createUserStore()
createUserStore(authInstance)
creates a store that holds the current user's data.
The store is updated automatically when the user's data changes.
Parameters
authInstance: Auth
- The firebase auth instance. If you put the component at the root of your app, or higher than where you're using this store, you can usenull
orundefined
as the parameter and the store will retrieve the auth instance from the context.
Properties
subscribe: ((auth: Auth) => void)) => void;
- Subscribe method for the Svelte store. Allows for the `$store` syntax.signOut: () => Promise<void>
- Signs the user out.loading: boolean