Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Alpine app use better Alpine conventions #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

markjaquith
Copy link

(Great video, by the way)

The Alpine app doesn't actually work right now (you can't use x-for on a <ul> — only on a <template>), and it was coded in not a very Alpine-y way. This PR is a much more idiomatic implementation.

  • fixed broken use of x-for on <ul>
  • removed unnecessary use of global state
  • removed unnecessary function
  • move storage syncing to an x-effect
  • @submit instead of x-on:submit
  • Reset input field after submission
  • Formatting cleanup

- fixed broken use of x-for on `<ul>`
- removed unnecessary use of global state
- removed unnecessary function
- move storage syncing to an `x-effect`
- `@submit` instead of `x-on:submit`
- Reset input field after submission
- Formatting cleanup
@JohannesMP JohannesMP mentioned this pull request Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant