Skip to content

Commit 6910dd3

Browse files
committed
Update README.md
1 parent a321f54 commit 6910dd3

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,31 @@ php artisan view:clear
5151
> [!CAUTION]
5252
> **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.
5353
54-
### Limitations
54+
## Limitations
5555

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:
5757

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.
5961

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.
6165

62-
#### Accessing variables shared using `View::share()`
66+
### Accessing variables shared using `View::share()`
6367

6468
Variables shared via `View::share()` will NOT be injected automatically. You have to access them manually:
6569

6670
```blade
6771
{{ $__env->shared('key') }}
6872
```
6973

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
7179

7280
- **Class-based components** are not supported
7381
- **The `$component` variable** will not be accessible
@@ -254,7 +262,7 @@ $classes = match($color) {
254262
</button>
255263
```
256264

257-
When compiled:
265+
When included on a page:
258266

259267
```blade
260268
<x-button color="red">Submit</x-button>
@@ -308,7 +316,7 @@ Before finalizing the output, Blaze substitutes the original dynamic expressions
308316
</button>
309317
```
310318

311-
### Dynamic props
319+
#### Dynamic props
312320

313321
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.
314322

0 commit comments

Comments
 (0)