Skip to content

Watch for render changes, getPageBlocks done #142

Open
@spyderdsn

Description

@spyderdsn

How to know when page blocks are done and DOM is fully updated? Is there any callback function?

const { data: blockMap } = useAsyncData('page_nuxt', () => $notion.getPageBlocks(pageUrl))

at the moment I'm using timeout but it is not always reliable:

await nextTick(() => {
    setTimeout(() => {
      document.body.scrollTop = 0 // For Safari
      document.documentElement.scrollTop = 0
      animations.apply('.notion', 'animated fade-in-right')
      isLoading.value = false
    }, 1500)
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions