Accudio / async-alpine

Async Alpine brings advanced code splitting and lazy-loading to Alpine.js components!
https://async-alpine.dev
Apache License 2.0
152 stars 12 forks source link

Beta 1.1 version #31

Closed Accudio closed 1 year ago

Accudio commented 1 year ago

Changes the loading strategy algorithm to include a logical expression parser.

Previously, you combined strategies with AND using | and more advanced functionality required utilising events. Now, you can set strategies that use && as AND, and || as OR which can be combined and grouped with brackets.

For example this example would load when a component is visible AND it has either received and event OR meets a certain media query:

ax-load="visible && (event || media(max-width: 400px))"

Note that the previous single pipe still works and is converted to && to maintain backwards-compatibility with version 1.

Remaining work to do for this release:

Accudio commented 1 year ago

I've updated the documentation on the v1.1 branch of async-alpine-website

Accudio commented 1 year ago

Long overdue due to life getting in the way but happy with this to launch now!

UnleashedMySelf commented 1 year ago

@Accudio thanks for your work!