<script>
import { onMount } from "svelte"
import Grid from "gridjs-svelte"
const data = [
{ name: "John", email: "john@example.com" },
{ name: "Mark", email: "mark@gmail.com" },
]
let grid
onMount(() => {
setTimeout(() => {
grid
.updateConfig({
data: [
{ name: "Yusuf", email: "hello@iamyuu.dev" },
]
})
.forceRender()
}, 3000)
})
</script>
<Grid bind:instance={grid} {data} />
<style global>
@import "https://cdn.jsdelivr.net/npm/gridjs/dist/theme/mermaid.min.css";
</style>