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
+10-43Lines changed: 10 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,11 +248,9 @@ The most important thing to understand is that the result of folding is a static
248
248
249
249
Blaze tries to avoid folding in situations where it's most likely to cause bugs but it is not possible to detect all cases. You will need to analyze each component individually and adjust the parameters to configure when folding should be aborted.
250
250
251
-
This solely depends on how dynamic attributes and slots are used internally.
252
-
253
251
### Global state
254
252
255
-
**Components which use global state should never be folded**. This constitutes anything that isn't passed into the component from the outside and instead accessed via a helper function, facade or a blaze directive. Usage of any of these patterns inside the component will produce incorrect results when folded.
253
+
**Components that use global state should never be folded**. This constitutes anything that isn't passed into the component from the outside and is instead accessed via a helper function, facade or a blaze directive. Usage of any of these patterns inside the component will produce incorrect results when folded.
256
254
257
255
| Category | Examples |
258
256
|----------|----------|
@@ -264,7 +262,7 @@ This solely depends on how dynamic attributes and slots are used internally.
264
262
| Time |`now()`, `Carbon::now()`|
265
263
| Security |`@csrf`|
266
264
267
-
_This applies to internal component code._ It can be okay to pass global state into the component via attributes or slots. However there are exceptions to that as well. We will explore these in the next sections.
265
+
> This applies to internal component code. It can be okay to pass global state into the component via attributes or slots. However there are exceptions to that as well. We will explore these in the next sections.
268
266
269
267
### Static attributes
270
268
@@ -419,15 +417,15 @@ Blaze pre-renders the component using the placeholder.
419
417
Which results in:
420
418
421
419
```blade
422
-
<button class="bg-red-500 hover:bg-red-400">
420
+
<button class="bg-gray-500 hover:bg-gray-400">
423
421
SLOT_PLACEHOLDER_1
424
422
</button>
425
423
```
426
424
427
425
Before finalizing the output, Blaze substitutes the original expression back into the HTML.
0 commit comments