How can I use FCM when I have this module installed? #1400
-
I am using this in Nuxt 3 (vuefire along with nuxt-vuefire). I can't find any documentation or examples of how I can use FCM with this configuration. Does anybody have any pointers for me? |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Aug 2, 2023
Replies: 1 comment 1 reply
-
You can retrieve the firebase app with <script setup>
import { useFirebaseApp } from 'vuefire'
import { getMessaging } from 'firebase/messaging'
const firebaseApp = useFirebaseApp()
const messaging = getMessaging(firebaseApp)
</script> I think I should add a page to docs as this applies to pretty much any Firebase service, it's not in VueFire's goals to provide wrappers for everything |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
FamilyMan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can retrieve the firebase app with
useFirebaseApp()
in any<script setup>
or in plugins, in nuxt. You can then pass that to any service, including FCM:I think I should add a page to docs as this applies to pretty much any Firebase service, it's not in VueFire's goals to provide wrappers for everything