Jump to content

Recommended Posts

Posted

I just came across this library and thought I'd share. Are any of you using this in your ProcessWire sites?

It looks very similar to what I've read about HTMX but I have yet to test either properly. I just dropped the following into the head of my portfolio site and now navigation is as smooth as butter! No page load flicker, and I didn't modify anything else.

The only bug on my site was when I tried to load the landing page in another language, but that may be as related to the URL segment, or the way in which PW organises translated pages? Not sure. 

I haven't learned enough about AJAX to know if this would interfere with existing contact forms or not without customisation (?). Curious to hear what you think, or if you're implementing this, HTMX or similar on your sites. Alpine AJAX looks like another interesting alternative.

<!-- 1. uJS Script - Include the script -->
<script src="https://unpkg.com/@digicreon/mujs/dist/mu.min.js"></script>
<!-- 2. Initialize -->
<script>mu.init();</script>

https://mujs.org/
 

 

  • Like 1
Posted

That's a good point. There seem to be ways around it but I've never worked with these before:
https://developers.google.com/analytics/devguides/collection/ga4/single-page-applications?implementation=browser-history

For the moment I'm trying out css view transitions api to fake a single page app look but it doesn't seem to work for Firefox yet.
I just added this to style.css:

@view-transition {
    navigation: auto;
}

 

Posted

I saw it on HN last week and it caught my eye as well:
https://news.ycombinator.com/item?id=47285876

I will be playing around with it at some point as I love the hypermedia approach of doing things (big HTMX fan).  I like that it can do what they call "patch modes" (what other libraries call "islands"?).  HTMX can do that too, but it's feels off with the "OOB" approach.  That has always bothered me, but I think they are addressing that in HTMX v4.

I've played with Alpine-Ajax and Datastar as well, but muJS seems like it best aligns with the way I think.

  • Like 3
×
×
  • Create New...