Viewi
Docs Blog Components Support Us

Documentation

Viewi v2
  • Getting Started
    1. Introduction
    2. Get started
    3. Installation
    4. Configuration
    5. Public configuration
    6. Watching mode
    7. VS Code extension
  • Components
    1. Creating Components
    2. Template Syntax
    3. Conditional Rendering
    4. List Rendering
    5. Event Handling
    6. Form input bindings
    7. Components Basics
  • Advanced
    1. Components and services
    2. Components In-Depth
    3. Extending with JavaScript
    4. Caveats
    5. PHP functions in the browser
    6. Startup
    7. Global methods
    8. Traits support
    9. Watch feature
    10. Override component
  • Routing and Middleware
    1. Routing
    2. Lazy loading routes and components
    3. Guards and Middleware
    4. Reusing layouts
    5. Client route
  • Data Fetching
    1. HTTP client
    2. HTTP interceptors
  • Assets
    1. Viewi assets
    2. CSS bundle
  • Using with Frameworks
    1. Frameworks integration and bridge
    2. Viewi Engine
    3. CodeIgniter4
    4. Laravel
    5. Leaf
    6. ReactPHP
  • Extra
    1. Subscriptions
    2. DOM helper
    3. Client Timer
    4. WebSocket client
    5. Portals
    6. Delay Render
    7. Browser session

Watch feature

If you want to track components property change, you can usewatchmethod inside ofinit` hook:

class SelectInput extends BaseComponent
{
    public $myProperty = null;
    // ...
    public function init()
    {
        $this->watch('myProperty', function() { 
            // myProperty has changed
        });
    }

Edit this page on GitHub

© 2026
  • Learn
  • Introduction
  • Blog
  • Get started
  • Routing
  • Lazy loading
  • Guards
  • Portals
  • Community
  • Discord
  • GitHub
  • Discussions
  • X (Twitter)
  • Support
  • Get help