API References¶
-
Complete Documentation
Comprehensive guides for all PhpSPA APIs and utilities
-
Code Examples
Practical examples for every feature
-
Best Practices
Learn the recommended patterns and techniques
-
Always Current
Updated documentation for the latest version
Client Runtime¶
-
Vite + TypeScript Runtime
Learn how the
@dconco/phpspapackage bootstraps navigation, state sync, and client helpers.
HTTP & Networking¶
-
Response API
Build and customize HTTP responses with fluent API
-
useFetch Hook
Async HTTP client with parallel execution support
-
Router API
Advanced routing with nested groups, middleware, and prefixing
Helpers & Utilities¶
-
fmt() Helper
Type-safe prop passing with automatic serialization
-
File Import Utility
Secure file imports with validation and metadata
-
DOM Utilities
Dynamic page title manipulation
Performance¶
-
Native Compression (C++ FFI)
Enable lightning-fast HTML/CSS/JS minification with the C++ compressor
Component Features¶
-
Component Preloading
Load multiple components on different target IDs for complex layouts
-
Client-Side useEffect
Manage side effects in component scripts
-
Client-Side useCallback
Memoize DOM/event handlers with state-aware dependencies
Browse by Category¶
| Hook | Description | Version |
|---|---|---|
useFetch() | Async HTTP client with parallel execution | v2.0.1 |
useState() | Reactive state management | v2.0.0 |
useEffect() (PHP) | Side effects and lifecycle hooks | v2.0.0 |
useEffect() (JS) | Client-side side effects | v2.0.4 |
useCallback() (JS) | Stable callbacks with dependency tracking | v2.0.5 |
useFunction() | Call PHP functions from JavaScript | v1.1.5 |
| Helper | Description | Version |
|---|---|---|
DOM::Title() | Get or set page title dynamically | v2.0.4 |
fmt() | Type preservation for component props | v2.0.1 |
import() | Secure file imports | v1.1.0 |
response() | HTTP response builder | v1.1.8 |
router() | Router instance access | v2.0.4 |
| Feature | Description | Version |
|---|---|---|
| Component Meta Tags | Route/global SEO metadata with ->meta() | v2.0.5 |
| Component Preloading | Multi-section layouts with independent updates | v2.0.4 |
<Component.Link> | Client-side navigation | v1.1.0 |
<Component.Csrf> | CSRF token management | v1.1.5 |
<Component.Navigate> | Programmatic navigation | v1.1.0 |
| Feature | Description | Version |
|---|---|---|
| Native Compression (C++ FFI) | Lightning-fast HTML/CSS/JS minification | v2.0.3 |
| HTML Compression | Enable compression for faster page loads | v1.1.5 |
| Assets Caching | Configure asset caching duration | v1.1.7 |
| Managing Styles & Scripts | Global and component-level asset management | v1.1.7 |