mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
[Optimizations] Simplified bookkeeping for component tree A component stack is no longer used Small API improvements Improved how component boundaries are managed Assign keys to all HTML elements and custom tags for better diffing Checking in progress Just build the src when calculating size
20 lines
384 B
Plaintext
20 lines
384 B
Plaintext
class {
|
|
onCreate() {
|
|
this.state = {
|
|
count: 0
|
|
}
|
|
}
|
|
}
|
|
|
|
<div.root key="root">
|
|
<if(state.count === 0)>
|
|
<foo key="a" count=state.count/>
|
|
<bar key="b" count=state.count/>
|
|
<foo key="c" count=state.count/>
|
|
</if>
|
|
<else>
|
|
<foo key="a" count=state.count/>
|
|
<foo key="b" count=state.count/>
|
|
</else>
|
|
</div>
|