Alpine does not require you to store all logic as HTML attribute values. When necessary, you can easily reference a global function that returns an object. Here, you can declare your component's data and behavior separately from the HTML. In this episode, we'll use a basic task app example to discuss how (and when) to extract component logic. We'll also review some important considerations when bundling your code.
View the source code for this episode on GitHub.
Published on Jun 23rd, 2020.