10-javascript-frameworks
10-javascript-frameworks copied to clipboard
Make Alpine app use better Alpine conventions
(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 -
@submitinstead ofx-on:submit - Reset input field after submission
- Formatting cleanup