Skip to main content

Recent Activity

Recent Heroes of the BenNadel.com Community

Recent Comments

Ben Nadel replied to a post You Can Include Delimiters In The Result Of JavaScript's String .split() Method When Using Capturing Groups

So, apparently I completely forgot about this post. 7-years later, I just ran into this behavior again; forgot that I wrote about it in 2017; and then just wrote about it again (2024): https://www.bennadel.com/blog/4628-understanding-regexp-capture-groups-when-using-split-in-javascript.htm I have a ... read entire comment from Ben Nadel.

Ben Nadel replied to a post Code Kata: Alpine.js Calendar Component

Ahhh, I think I see what's happening. The x-ref directive has a higher priority (than x-data). However, under the hood, it's attaching itself to the closestRoot(), which is looking for the closest element with the x-data attribute. As such, it finds itself, even though the x-data directive hasn't be... read entire comment from Ben Nadel.

Ben Nadel replied to a post Code Kata: Alpine.js Calendar Component

In my post, I mentioned that I couldn't use x-ref to get a reference to the calendar since the ref was being stored on the calendar itself and not on the app's $refs. However, looking at the Alpine.js source code, the ref directive has a higher priority than the data attribute. As such, I believe th... read entire comment from Ben Nadel.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel