Skip to content

Instantly share code, notes, and snippets.

View ryangjchandler's full-sized avatar
💭
I may be slow to respond.

Ryan Chandler ryangjchandler

💭
I may be slow to respond.
View GitHub Profile
<div x-data="example()">
<template x-for="(item, i) in items" :key="i">
<div x-bind="props(i)"></div>
</template>
</div>
<script>
const example = () => ({
current: 0,
items: [1, 2, 3],
props: (i) => ({