Skip to content

Conversation

@reslear
Copy link
Collaborator

@reslear reslear commented May 26, 2021

  1. Refactor registering plugins by spec doc
    https://capacitorjs.com/docs/updating/plugins/3-0#registering-plugins

  2. move constructor init to method hook init for manually controlling loading on document ready

    example for vue:

    import { defineComponent, onMounted } from 'vue'
    import { GoogleAuth } from '@reslear/capacitor-google-auth'
    
    export default defineComponent({
      setup() {
        onMounted(() => {
          GoogleAuth.init()
        })
        
        const logIn = async () => {
          const response = await GoogleAuth.signIn()
          console.log(response)
        }
        
        return {
          logIn
        }
      }
    })

@reslear reslear force-pushed the refactor/web-lazy-import branch from a1f3511 to 5d0ccc4 Compare May 26, 2021 03:15
@reslear reslear changed the title refactor(web): lazy loading plugin refactor(web): registering plugins with types May 26, 2021
@reslear reslear changed the title refactor(web): registering plugins with types refactor(web): registering plugins and lazy loading May 26, 2021
@fullstackduck fullstackduck merged commit bdfa2e5 into CodetrixStudio:master May 31, 2021
@reslear reslear deleted the refactor/web-lazy-import branch June 9, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants