refactor: rename DTree to DValue
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
:sig
|
||||
String component(String name, [DTree props], [Request& context])
|
||||
String component(String name, [DValue props], [Request& context])
|
||||
|
||||
:see
|
||||
>ob
|
||||
@@ -37,7 +37,7 @@ When a component unit defines `ONCE(Request& context)`, the runtime calls that h
|
||||
Default component handler:
|
||||
|
||||
```cpp
|
||||
DTree props;
|
||||
DValue props;
|
||||
props["title"] = "Status";
|
||||
|
||||
<><?: component("workspace/panel", props, context) ?></>
|
||||
@@ -46,7 +46,7 @@ props["title"] = "Status";
|
||||
Named component handler:
|
||||
|
||||
```cpp
|
||||
DTree props;
|
||||
DValue props;
|
||||
props["title"] = "System";
|
||||
props["body"] = "Healthy";
|
||||
|
||||
@@ -76,7 +76,7 @@ COMPONENT:BODY(Request& context)
|
||||
Preparing props in C++ before rendering:
|
||||
|
||||
```cpp
|
||||
DTree props;
|
||||
DValue props;
|
||||
props["items"][0] = "alpha";
|
||||
props["items"][1] = "beta";
|
||||
props["items"][2] = "gamma";
|
||||
|
||||
Reference in New Issue
Block a user