Skip to content

grantas33/kotlin-pwa-components

Repository files navigation

Module kotlin-pwa-components

This module includes two utility hook functions and can be used in progressive web applications which:

  • Use Kotlin.js
  • Provide a service worker script file for the browser
  • Use Kotlin React wrapper library

Kotlin PWA starter kit includes a sample of the hooks in action:

val serviceWorkerState = useServiceWorker()
val (pushManagerState, subscribeUser, unsubscribeUser) = usePushManager(
    serviceWorkerState = serviceWorkerState,
    publicKey = "BLceSSynHW5gDWDz-SK5mmQgUSAOzs_yXMPtDO0AmNsRjUllTZsdmDU4_gKvTr_q1hA8ZX19xLbGe28Bkyvwm3E"
)