We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b17a554 commit e3a1e76Copy full SHA for e3a1e76
README.md
@@ -385,6 +385,21 @@ result = html(t"<ul><{Items} /></ul>")
385
assert str(result) == "<ul><li>first</li><li>second</li></ul>"
386
```
387
388
+If you prefer, you can use **explicit fragment syntax** to wrap multiple
389
+
390
391
+elements in a `Fragment`:
392
393
+```python
394
+def Items() -> Node:
395
+ return html(t'<><li>first</li><li>second</li></>')
396
397
+result = html(t'<ul><{Items} /></ul>')
398
+assert str(result) == "<ul><li>first</li><li>second</li></ul>"
399
+```
400
401
+This is not required, but it can make your intent clearer.
402
403
#### Class-based components
404
405
Component functions are great for simple use cases, but for more complex
0 commit comments