svelte mount

Solutions on MaxInterview for svelte mount by the best coders in the world

showing results for - "svelte mount"
Johanna
23 Nov 2019
1<script>
2	import { onMount } from 'svelte';
3
4	let photos = [];
5
6	onMount(async () => {
7		const res = await fetch(`https://jsonplaceholder.typicode.com/photos?_limit=20`);
8		photos = await res.json();
9	});
10</script>