What's New With 2.0
New Features
File Upload Support
// wires/FileUploader.cfc
component extends="cbwire.models.Component" {
data = {
"uploadedFile" = "",
"uploadedFiles" = [],
"uploadProgress" = 0
};
function processUpload() {
if (structKeyExists(data, "uploadedFile") && len(data.uploadedFile)) {
// Handle single file upload
var uploadPath = expandPath("./uploads/");
fileMove(data.uploadedFile, uploadPath & data.uploadedFile.getClientFileName());
data.uploadProgress = 100;
}
}
function processMultipleUploads() {
if (arrayLen(data.uploadedFiles)) {
var uploadPath = expandPath("./uploads/");
for (var file in data.uploadedFiles) {
fileMove(file, uploadPath & file.getClientFileName());
}
data.uploadProgress = 100;
}
}
}Component Testing
Custom Wires Directory
Skip Rendering with noRender()
Dirty Property Tracking
Computed Property Optimization
Dependency Injection Support
Enhanced Turbo Support
Enhancements
Template Path Flexibility
Null Value Support
Livewire JavaScript Upgrade
Performance Optimizations
Bug Fixes
Component State Management
Browser Compatibility
Data Integrity
Breaking Changes
Component Structure
XHR Security
Template Resolution
Last updated
Was this helpful?