You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/onstate-before-render/main.html

24 lines
333 B

<script>
import { onmount, onprops, onupdate } from 'svelte';
import order from './order.js';
function identity(x) {
order.push('render');
return x;
}
onprops(() => {
order.push('onprops');
});
onupdate(() => {
order.push('onupdate');
});
onmount(() => {
order.push('oncreate');
});
</script>
{identity(42)}