CBWIRE
InstallSource CodeIssuesSupport
v3.x
v3.x
  • Introduction
  • Getting Started
  • Configuration
  • How It Works
  • Release History
    • What's New With 3.2
    • What's New With 3.1
    • What's New With 3.0
    • What's New With 2.2
    • What's New With 2.1
    • What's New With 2.0
  • Examples
    • Contact Form
    • Multi-select Input
    • File Upload
  • Resources
  • The Essentials
    • Components
    • Templates
    • Data Properties
    • Computed Properties
    • Actions
    • Events
    • Lifecycle Methods
    • JavaScript
    • Testing
  • Wire Features
    • Validation
    • File Uploads
    • Query String
    • Redirecting
    • WireBox
  • Template Features
    • Directives
    • Loading States
    • Polling
    • Prefetching
    • Offline State
    • Defer Loading
    • Dirty State
  • Integrations
    • ContentBox CMS
    • SPAs with Turbo
    • AlpineJS
Powered by GitBook
On this page

How It Works

HTML-over-the-wire explained.

PreviousConfigurationNextRelease History

Last updated 1 year ago

This diagram references the Counter we created in the and shows how CBWIRE achieves reactive UI components with zero page refreshing.

  1. The user requests a page from the server that includes our Counter component.

  2. ColdBox receives the request.

  3. CBWIRE parses our component and initially renders it with its default values.

  4. The rendered component is sent to the browser. It's important to understand that nothing extraordinary has happened at this point. We've returned HTML to the browser from an incoming request. Next is when things get interesting.

  5. The user clicks the button.

  6. CBWIRE intercepts the user's click client-side and sends an XHR request to the server.

  7. CBWIRE runs the increment() method, updating the data properties.

  8. CBWIRE re-renders the template.

  9. CBWIRE returns the re-rendered template to the browser.

  10. CBWIRE uses Livewire's DOM diffing technology to update the component on the page.

Introduction