Cueflow.check()

Manually trigger a check for new messages. Useful for custom navigation handling.

Syntax

Cueflow.check()

Parameters

None.

Basic Example

// Manually check for messages
Cueflow.check();

When to Use

Automatic Navigation Detection

Cueflow automatically detects navigation in most cases:

  • Browser back/forward buttons (popstate)

  • history.pushState() and history.replaceState()

You typically don't need to call check() manually.

Custom Navigation

If your app uses custom routing that doesn't trigger standard navigation events, call check() after navigation:

Hash-Based Routing

For apps using hash-based routing (#/page):

After Dynamic Content

If page content changes significantly without navigation:

Framework Examples

React Router (Custom)

If React Router events aren't detected:

Vue Router

Angular

What Happens

When you call check():

  1. Gets current page context - URL, path, query params

  2. Sends to Cueflow - Checks which messages match

  3. Updates display - Shows new messages, hides irrelevant ones

Requirements

  • Must call Cueflow.init() first

  • Calling before init shows a warning: "Cueflow: Not initialized"

Performance

check() is lightweight and debounced internally. You can call it frequently without performance concerns.

Next Steps

Last updated