| layout | home | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hero |
|
||||||||||||||||||||||||||||||||||||||||||
| features |
|
Build your first component in 5 minutes:
composer require diffyne/diffyne
php artisan make:diffyne Counter<?php
namespace App\Diffyne;
use Diffyne\Attributes\Invokable;
use Diffyne\Component;
class Counter extends Component
{
public int $count = 0;
#[Invokable]
public function increment()
{
$this->count++;
}
}<div>
<h2>Count: {{ $count }}</h2>
<button diff:click="increment">+</button>
</div>That's it! Your component is reactive and ready to use.
Traditional server-side rendering sends full HTML on every interaction. Diffyne uses a Virtual DOM diff engine to send only the changes, making your applications faster and more responsive.
Before (Traditional):
- User clicks button
- Server sends 5KB HTML response
- Browser replaces entire component
With Diffyne:
- User clicks button
- Server sends 50 bytes patch
- Browser updates only changed text node
Result: 70-95% smaller payloads, faster updates, better UX.
- Forms with real-time validation
- Dashboards with live data updates
- Search with instant results
- Interactive UIs without writing JavaScript
- Real-time apps with WebSocket support
Ready to get started? Read the guide →