toolsWTF 4.3via Simon Willison
Inline rendering with document.currentScript
"Local-first React is just <script> tags and a dream."
Explain Like I'm Normal
A clever use of the document.currentScript property allows developers to create a 'self-replacing' script tag for instant inline rendering. By mapping this to a shorthand function, you can essentially create a zero-dependency template language for dynamic content. This is a neat trick for performance-obsessed builders who want to avoid heavy client-side frameworks for simple data injection.
#javascript#webdev#minimalism
GET THE DAILY CHAOS
The only newsletter for people who read AI news at 3am and feel things. One email a day.