You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,23 +51,31 @@ php artisan view:clear
51
51
> [!CAUTION]
52
52
> **If you're installing Blaze into an existing app**, enabling Blaze in all component paths can break your app. Consider scoping Blaze to specific directories or components until you've worked around the limitations described below.
53
53
54
-
###Limitations
54
+
## Limitations
55
55
56
-
Blaze supports all essential features of anonymous components and produces HTML output that is identical to Blade. That said, there are some limitations:
56
+
Blaze supports all essential features and produces HTML output that is identical to Blade. The focus is on maximizing performance while maintaining compatibility. That said, there are some limitations to be aware of:
57
57
58
-
#### Accessing parent data using `@aware`
58
+
-**Class-based components**
59
+
60
+
To maximize the performance, **class-based components are not supported**. Therefore, the `$component` variable, which normally points to the component class instance, will not be available.
59
61
60
-
While `@aware` is supported, you must use Blaze in both parent and child for values to propagate correctly.
62
+
### View composers / creators / lifecycle events
63
+
64
+
View composers, creators, and component lifecycle events will not run for Blaze components.
61
65
62
-
####Accessing variables shared using `View::share()`
66
+
### Accessing variables shared using `View::share()`
63
67
64
68
Variables shared via `View::share()` will NOT be injected automatically. You have to access them manually:
65
69
66
70
```blade
67
71
{{ $__env->shared('key') }}
68
72
```
69
73
70
-
#### Unsupported features
74
+
### Using `@aware` between Blade and Blaze components
75
+
76
+
While `@aware` is supported, you must use Blaze in both parent and child for values to propagate correctly.
77
+
78
+
### Unsupported features
71
79
72
80
-**Class-based components** are not supported
73
81
-**The `$component` variable** will not be accessible
@@ -254,7 +262,7 @@ $classes = match($color) {
254
262
</button>
255
263
```
256
264
257
-
When compiled:
265
+
When included on a page:
258
266
259
267
```blade
260
268
<x-button color="red">Submit</x-button>
@@ -308,7 +316,7 @@ Before finalizing the output, Blaze substitutes the original dynamic expressions
308
316
</button>
309
317
```
310
318
311
-
### Dynamic props
319
+
####Dynamic props
312
320
313
321
In the previous example, the dynamic attribute was handled successfully because it was passed directly to the HTML output. However, if a dynamic prop is used in conditions or transformations, folding may fail.
0 commit comments