`onclick` is still awesome for simple features.
For example, we can reveal blurred API keys with something as simple as removing a class on a previous element.
No registering event listeners, no stimulus controllers, no third-party libraries. Just works.
@robzolkos Kind of an aside, but you can use actions instead and not worry about adding/removing event listeners or `this`, `bind`, etc.
Assuming your controller’s name is “thing”, then: <div data-controller="thing" data-action="message@window->thing#handleMessagesFromApp">…</div>
Hello JS friends who may know Stimulus. I have registered this listener but in the actual listener function the stimulus values are undefined. I’m almost certain its a “this” issue which I don’t quite understand fully.
Winner winner — for us. We bagged 4th in National class at Sno*Drift Rally 2023! New-to-me Subaru 2.5RS high compression, haven’t rallied in 3 years, and had the transmission out of the car until moments before we left.
Codriver KJ Miller is absurdly talented and hardworking.
@frayzil I want a "Cancel" link in a form to take you back to a URL and specifically I don't want users to be able to middle-mouse click to open it in a new tab
button_to with method: :get doesn't work since it's inside a form already :(
@_swanson 1. lol
2. you can solve the nested form problem with something like ↓
<form action="…" method="post">
<button>Submit</button>
<button form="cancel-form">Cancel</button>
</form>
<form action="…" method="get" id="cancel-form" hidden></form>
I'm adding a boolean column to store if a model allows voting on its subrecords to a model in my side project... what would you name the column?
I already have two other booleans `private` and `closed`, I am real conflicted on this one.
@zachwaugh I tried to switch from 5K to 4K and it *felt* like a downgrade. Might have been entirely psychological but what can you do.
Ended up getting the same (overpriced) 27” LG 5K on eBay “like new” for ~$900. 🤷♂️