Skip to content

Instantly share code, notes, and snippets.

@Mikepicker
Created September 26, 2022 17:44
Show Gist options
  • Save Mikepicker/acb129dea0d62e279045f45fa0ccd54d to your computer and use it in GitHub Desktop.
Save Mikepicker/acb129dea0d62e279045f45fa0ccd54d to your computer and use it in GitHub Desktop.
<html>
<head>
...
</head>
<body>
...
<script>
document.addEventListener('alpine:init', () => {
Alpine.data('lists', () => ({
// pocketbase client
client: null,
// login / signup
showLogin: false,
email: null,
password: null,
passwordConfirm: null,
loginMessage: null,
signupMessage: null,
// lists data
lists: [],
newListName: '',
selectedList: null,
// items data
items: null,
newItem: null
}))
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment