mirror of https://github.com/sveltejs/svelte
parent
48c705aea1
commit
6a752a5675
@ -1,14 +1,13 @@
|
||||
<p>{value}</p>
|
||||
<p>{called}</p>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return { called: false };
|
||||
},
|
||||
import { onmount } from 'svelte';
|
||||
|
||||
export let value;
|
||||
let called = false;
|
||||
|
||||
oncreate() {
|
||||
this.set({ called: true });
|
||||
}
|
||||
};
|
||||
onmount(() => {
|
||||
called = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>{value}</p>
|
||||
<p>{called}</p>
|
Loading…
Reference in new issue