Laracasts - Alpine.js Essentials
Laracasts - Alpine.js Essentials
Genre: eLearning | MP4 | Video: AVC, 1280x720 | Audio: aac, 48 kHz
Language: English | Size: 442 MB | Duration: 11 episodes (2h28m) | Beginner
Alpine.js is a relatively new jаvascript framework for defining behavior directly in your markup. While similar to frameworks like Angular and Vue, you may find that Alpine is a bit more light-weight and portable. In this series, one step at a time, I'll get you up and running as quickly as possible
Section 1 The Essentials
Let's Build a Memory Game
Before we dig into Alpine, let's first build something simple, but demonstrative of what your typical workflow might look like. Please note that this episode will move a bit more quickly and is not intended to be your "Step 1" for learning Alpine. Just come along for the ride, and then, in the next episode, we'll hit the breaks, rewind, and start learning each piece of the puzzle from scratch.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/715d41f097bd1e4629f817f93886ae70
Data Binding
Let's begin with the basics. Alpine allows us to easily bind the value of an attribute to an expression. In this lesson, we'll review a variety of simple examples.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/32e2dee5de8db27d0bcab453e52e65f0
Toggle Visibility Using State
In this lesson, you'll learn how to toggle an element's display dependent upon on a piece of state. As you'll find, so many of the bread-and-butter components that all websites share can be reduced to a simple on/off switch. Show the modal, hide the modal. Show the tab, hide the tab.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/d3e0e5692b72c3d15d50061407028e39
Two-Way Data Binding
You're currently familiar with one-direction data binding; however, often you'll require two-way binding in your forms. It's not enough to bind a value to an input. We also need to listen for when the input's value changes, and update the underlying data. We can allow for this by using x-model. In this episode, we'll review what precisely happens when you add this attribute to a form input. Then, as a small demo, we'll use that data to submit an AJAX request to a fake server.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/e46f2bfc23ae75f0ea136c30d7de215f
How and When to Extract Component Logic
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.
https://gist.github.com/JeffreyWay/4860d1fcf1bfcaf8b24e78ec350f9658
Transitions 101
Let's move on to transitions. Alpine offers a useful transition modifier that instantly applies a simple opacity and scale fade when toggling the display of an element. However, when you require more precision, you can easily hook into each step of the transition. Let's learn how in this episode before moving on to a real-life use case.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/9c97f838b4cce367490c1af66c92f0cf
Transitions 102
Now that you understand the basic syntax for defining transitions, in this episode, let's add the appropriate transitions for a typical pop-up menu.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/0aff02a63ffd87b59b1a343fee7a803d
Handling Custom Events
Let's move on to events. You already know the basics of how to listen for any DOM events, so let's take things up a notch and discuss how Alpine components can communicate with one another through custom events that bubble up to the window.
View the source code for this episode on GitHub.
https://gist.github.com/JeffreyWay/f01b65444f66776e07648784109612de
Section 2 TodoMVC Workshop
09
TodoMVC with Alpine: Part 1
The wonderful thing about Alpine stems from the fact that it can be learned entirely within a few hours. With that in mind, together, let's work on an Alpine-specific implementation of the popular TodoMVC project.
http://todomvc.com/
In the first of this three-part workshop, we'll get the initial functionality in place. If working along, please download the initial TodoMVC template.
https://github.com/tastejs/todomvc-app-template
10
TodoMVC with Alpine: Part 2
Let's keep working on our Alpine.js implementation of TodoMVC. In this episode, we'll focus on filters, clearing completed tasks, and editing individual tasks.
11
TodoMVC with Alpine: Part 3
It's time to wrap up this project. I've compiled a list of remaining tasks and features we need to complete. Let's knock them out one by one.
View the source code for this project on GitHub.
https://github.com/laracasts/todomvc-alpine
PLEASE SUPPORT ME BY CLICK ONE OF MY LINKS IF YOU WANT BUYING OR EXTENDING YOUR ACCOUNT
http://nitroflare.com/view/2AED9B009EA2D20/Alpine.js_Essentials.rar
https://rapidgator.net/file/f0cfb9f67904750ac1a64a2fb05ae8cb/Alpine.js_Essentials.rar.html
https://uploadgig.com/file/download/5461f3bC857538e8/Alpine.js_Essentials.rar
http://nitroflare.com/view/2AED9B009EA2D20/Alpine.js_Essentials.rar
https://rapidgator.net/file/f0cfb9f67904750ac1a64a2fb05ae8cb/Alpine.js_Essentials.rar.html
https://uploadgig.com/file/download/5461f3bC857538e8/Alpine.js_Essentials.rar
Comments (0)
Users of Guests are not allowed to comment this publication.