Livewire 4에서 오셨나요?
KScript는 자체 컴포넌트 문법을 사용해요. 아래는 자주 쓰는 작업과 그에 해당하는 방법이에요.
| Livewire 4 | KScript |
|---|---|
| 컴포넌트 템플릿과 프로퍼티 | extends Component, 타입이 지정된 필드, <state> |
wire:model |
@bind($field, on: …) |
wire:click와 wire:submit |
on-click와 on-submit |
| 디스패치와 리스너 | @emit_event()와 on-event |
wire:navigate |
live-navigate |
wire:stream |
live-stream와 @stream() |
@teleport |
<template live-portal="…"> |
| JavaScript 훅, 디렉티브, 컴포넌트 호출 | KScriptLive.on(), KScriptLive.directive(), KScriptLive.call() |
주변 사이트는 웹 페이지를 참고하세요. 미들웨어, 소유권, 컨트롤러 계약은 라우트와 API를 참고하세요. MCP 클라이언트에서는 read_doc에게 components 페이지를 요청하세요.