10-javascript-frameworks icon indicating copy to clipboard operation
10-javascript-frameworks copied to clipboard

Make Alpine app use better Alpine conventions

Open markjaquith opened this issue 4 years ago • 0 comments

(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

markjaquith avatar Sep 24 '21 06:09 markjaquith