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/lifecycle-render-order/main.svelte

24 lines
356 B

<script>
import { onMount, beforeUpdate, afterUpdate } from 'svelte';
import order from './order.js';
function identity(x) {
order.push('render');
return x;
}
beforeUpdate(() => {
order.push('beforeUpdate');
});
afterUpdate(() => {
order.push('afterUpdate');
});
onMount(() => {
order.push('onMount');
});
</script>
{identity(42)}