Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / app.html
Last active April 19, 2016 10:26
Aurelia: Suboptimal repeat element lifecycle [alternative without compose + diff]
<template>
<require from="./component"></require>
<input type="checkbox" ref="isFiltering">
<br>
<component
repeat.for="id of components | without8: isFiltering.checked | diff"
id.bind="id"
></component>
</template>
@niieani
niieani / app.html
Last active April 19, 2016 10:25
Aurelia: Repeater does not observe changes on the array returned from ValueConverter
<template>
<div repeat.for="text of components | test">
${text}<br>
</div>
</template>
@niieani
niieani / app.html
Created April 19, 2016 14:47
Aurelia: Suboptimal repeat element lifecycle [alternative without compose + diff + temp]
<template>
<require from="./component"></require>
<input type="checkbox" ref="isFiltering">
<br>
<component
repeat.for="id of components | without8: isFiltering.checked | diff: proxy"
id.bind="id"
></component>
</template>
@niieani
niieani / app.html
Last active April 19, 2016 17:11
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing v2]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
@niieani
niieani / app.html
Last active April 19, 2016 16:47
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing + deepCompare]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="obj of componentsProxy"
id.bind="obj.id"
></component>
@niieani
niieani / app.html
Last active April 19, 2016 17:21
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
@niieani
niieani / app.html
Last active July 14, 2016 00:29
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing + 9000 elements]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
@niieani
niieani / app.html
Last active September 4, 2018 09:37
Aurelia: Suboptimal repeat element lifecycle [alternative without compose + optimized-repeat]
<template>
<require from="./component"></require>
<input type="checkbox" ref="isFiltering">
<br>
<component
optimized-repeat.for="id of components | without8: isFiltering.checked"
text.bind="id">
[${$index}]
</component>
@niieani
niieani / app.html
Last active April 23, 2016 23:36
Aurelia: Suboptimal repeat element lifecycle [swap-arrays/reverse + optimized-repeat]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<button click.delegate="reverse()">Reverse</button>
<br>
<component
optimized-repeat.for="id of components"
text.bind="id">
[${$index}]
@niieani
niieani / app.html
Last active April 24, 2016 01:48
Aurelia: Suboptimal repeat element lifecycle [swap-arrays + optimized-repeat + matcher]
<template>
<require from="./component"></require>
<require from="./object-component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<button click.delegate="reverse()">Reverse</button>
<br>
<component
optimized-repeat.for="id of components"
text.bind="id">