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: example/components/App.js
+36-1Lines changed: 36 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,36 @@
1
+
classTableextendsOpenScript.Component{
2
+
render(...args){
3
+
returnh.fragment(
4
+
h.table(
5
+
{class: 'table'},
6
+
h.tbody(
7
+
each([1,2,3,4,5,6],()=>h.Row("Column")),
8
+
),
9
+
...args
10
+
)
11
+
)
12
+
}
13
+
}
14
+
15
+
classRowextendsOpenScript.Component{
16
+
render(text, ...args){
17
+
returnh.fragment(
18
+
h.tr(
19
+
each([1,2,3,4],()=>h.Column(text)),
20
+
...args
21
+
)
22
+
)
23
+
}
24
+
}
25
+
26
+
classColumnextendsOpenScript.Component{
27
+
render(text, ...args){
28
+
returnh.fragment(
29
+
h.td(text, ...args)
30
+
);
31
+
}
32
+
}
33
+
1
34
classAppextendsOpenScript.Component{
2
35
3
36
constructor(){
@@ -69,7 +102,9 @@ class App extends OpenScript.Component {
69
102
70
103
h.BlogList(context("blogCxt").blogs,context('blogCxt').counter,"I am a blog List. I re-render when counter changes"),
71
104
72
-
h.BlogList(context("blogCxt").blogs,{value: 0},'I am the same blog list. I do not re-render when counter changes because I do not listen its changes.')
105
+
h.BlogList(context("blogCxt").blogs,{value: 0},'I am the same blog list. I do not re-render when counter changes because I do not listen its changes.'),
0 commit comments