Jason Miller ๐ŸฆŠโš› Profile Banner
Jason Miller ๐ŸฆŠโš› Profile
Jason Miller ๐ŸฆŠโš›

@_developit

60,294
Followers
2,450
Following
2,872
Media
43,632
Statuses

Platform DX @Shopify . Created @preactjs . Do more with less. @developit @mastodon .social

Hamilton, Ontario, Canada
Joined September 2008
Don't wanna be here? Send us removal request.
Pinned Tweet
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
Introducing Preact Signals: a reactive state primitive that is fast by default. โœ… feels like using plain values ๐Ÿฅณ automatic updates when values change โฑ updates DOM directly (fast!) ๐Ÿฅน no dependencies arrays
Tweet media one
127
446
3K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
git blame
Tweet media one
30
678
4K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
me: why the heck is this CSS not being applied?? my keyboard: I ahve no idae man
Tweet media one
113
419
4K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ I have an exciting announcement: I'm joining the Chrome team @Google in the new year! Looking forward to pushing the web...forward! ๐Ÿ˜Š
226
182
3K
@_developit
Jason Miller ๐ŸฆŠโš›
1 year
With the new Navigation API, you can now show the native spinner + stop button for any asynchronous operation - all you need is a Promise.
24
355
3K
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
Should I use SSR? What about Rehydration? Where should we implement logic and rendering in our applications? Answers:
Tweet media one
38
753
2K
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
Please don't import SVGs as JSX. It's the most expensive form of sprite sheet: costs a minimum of 3x more than other techniques, and hurts both runtime (rendering) performance and memory usage. This bundle from a popular site is almost 50% SVG icons (250kb), and most are unused.
Tweet media one
88
371
2K
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
HTM 2 is here! ๐ŸŽ‰ โšก๏ธ 20x faster (seriously) ๐Ÿฆ„ Custom JSX parser ๐Ÿค  under 700 bytes ๐Ÿคซ compiles to nothing
Tweet media one
38
511
2K
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
๐Ÿฆ– HTM: JSX without the transpiler. 700 bytes to run in the browser, or compile it away using babel-plugin-htm. (works with any VDOM library!)
Tweet media one
69
516
2K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Please don't open issues on JS repos asking why they aren't written in TypeScript :(
67
155
2K
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
โš›๏ธ Preact X is here. The @preactjs team spent over a year rewriting Preact, and it's finally ready.
52
551
2K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Today is my first day at Google! Very exciting ๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€
82
50
2K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ’โ€โ™€๏ธ Cost of updating text in the DOM โฌ›๏ธโฌ›๏ธโฌ›๏ธโฌ›๏ธโฌ›๏ธโฌ›๏ธ .innerHTML โฌ›๏ธโฌ›๏ธโฌ›๏ธโฌœ๏ธโฌœ๏ธโฌœ๏ธ .textContent โฌ›๏ธโฌ›๏ธโฌœ๏ธโฌœ๏ธโฌœ๏ธโฌœ๏ธ .innerText โฌ›๏ธโฌœ๏ธโฌœ๏ธโฌœ๏ธโฌœ๏ธโฌœ๏ธ .firstChild.data - Use innerText if you can't assume structure - Use Text #data to update existing text
30
587
2K
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
I'm building a compiler that turns crufty JS into lean modern syntax.
Tweet media one
46
221
2K
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
๐Ÿ‘ฉโ€๐Ÿš€ Introducing ๐—ช๐— ๐—ฅ: The tiny all-in-one development tool for modern web apps. Everything you need to build a fast Preact site, from dev to prod. ๐Ÿฆ„ TSX, HMR, CSS Modules, etc ๐Ÿฆฆ use npm modules without installing ๐Ÿ“ฆ one 2mb file, no dependencies โ†’
38
345
2K
@_developit
Jason Miller ๐ŸฆŠโš›
7 years
If you use a retina mac, this @Code setting will change your life: { "workbench.fontAliasing": "antialiased" }
Tweet media one
51
373
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
this is a thing you can for some reason do in Keynote
36
130
1K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Woah, @Github is now responsive...
30
218
1K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
gets me every time
11
192
1K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
little-known emoji fact
Tweet media one
28
343
1K
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
๐Ÿ’ธ Cost of updating text in the DOM: 2019 Edition โฌ›๏ธโฌ›๏ธโฌ›๏ธโฌ›๏ธโฌ›๏ธโฌ›๏ธ .innerHTML โฌ›๏ธโฌ›๏ธโž–โž–โž–โž– .textContent โฌ›๏ธโฌ›๏ธโž–โž–โž–โž– .innerText โฌ›๏ธโž–โž–โž–โž–โž– .firstChild.data - Use .textContent if you can't assume structure - Use Text #data to update existing text
Tweet media one
12
452
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
SHIFT + ESC marks all Slack messages as read. have a good weekend
22
218
1K
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
Hey you! Want to see how much faster your site would be with modern JavaScript? โœ… calculates it for you!
59
312
1K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ Introducing.. prerender-loader! ๐Ÿ“ฐ Painless universal pre-rendering for Webpack. โ›น๏ธโ€โ™€๏ธ Improve first paint, often without a code change! โœจ
Tweet media one
18
389
1K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
Last week, Preact hit 1 million weekly downloads. The little library I built in 2015 as a learning exercise is now found on ~4% of websites, including some of the most visited websites globally. I'm lucky to work with this awesome team, and excited for what's shipping in 2022.
Tweet media one
43
64
1K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ Introducing Workerize: Offload modules into Web Workers with a simple prefix! ๐Ÿ˜ Statically compiles exports to reflected async functions ๐Ÿ˜ƒ โœจ
Tweet media one
37
416
1K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
Tomorrow is my last day at Google. ๐Ÿ™€ It's been an amazing experience, marked by a wonderful group of friends who I'll miss (virtually) hanging out with. The next chapter in this adventure will take place at Shopify, starting in May.
114
19
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
There's an official Github CLI?
25
217
1K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
docs are hard, often harder than code
54
121
1K
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
Here's a recipe webpage after sitting for 5 minutes: โ†™๏ธŽ with ads ๐Ÿ†š with ads blocked โ†˜๏ธŽ
Tweet media one
Tweet media two
38
324
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Redaxios: axios for the browser, 800b and uses fetch
Tweet media one
26
224
1K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฆ Size Plugin for Webpack! ๐Ÿ•ต๏ธโ€โ™€๏ธ Keep an eye on those bundle sizes... ๐Ÿ‹๏ธโ€โ™‚๏ธ Shows compressed sizes #๏ธโƒฃ Compares even if file hashes change > npm i -D size-plugin
Tweet media one
12
273
1K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
New state model for VDOM dramatically simplifies your code, and is also kinda performance magic. Left: standard component rendering Right: same code with optimization enabled (no compile, just a library and stock @preactjs )
Tweet media one
33
170
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
It's time to enable modern JavaScript npm libraries. This post by @GaryLChew explains the current state and ways forward. I think the combined solution is compelling.
Tweet media one
26
313
1K
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ Announcing... Karmatic! ๐Ÿฆ‘ Easy automatic (headless) browser testing ๐Ÿ›  No config needed, auto-detects webpack settings ๐Ÿคนโ€โ™€๏ธ Only one dependency to juggle ๐ŸŽ Powered by Karma, Webpack, Jasmine & Puppeteer
36
372
1K
@_developit
Jason Miller ๐ŸฆŠโš›
1 year
lol, $0.30 per API call
42
36
1K
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
GitHub now shows a Table of Contents for readmes
7
162
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
I finally got around to testing out VSCode Online today. Here it is running as a Desktop PWA. To me, this is basically indistinguishable from local VSCode, except the Mac's fans aren't spinning.
Tweet media one
22
139
1K
@_developit
Jason Miller ๐ŸฆŠโš›
7 years
๐ŸŽ‰ It's here! A 500 byte fetch() polyfill. Supports headers, json/text/xml/blob bodies, etc. Five. hundo. bytes. ๐ŸŒฏ
Tweet media one
25
379
1K
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
I'm officially on the "location-based pay is bad" train now
39
41
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Lighthouse CI is ridiculously awesome
8
161
1K
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
random CSS-only menu I made last night
26
102
1K
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Redaxios is an ~800b Axios stand-in built on Fetch. 0.3 just added support for the baseURL, responseType, params, paramsSerializer and withCredentials options, plus fetch mocking and FormData support.
Tweet media one
25
206
998
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
HTM's preact integration now includes hooks. 4.6kb for VDOM + JSX + hooks with no build step is good value-for-money, IMO.
Tweet media one
24
129
967
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Houssein just announced something I've been working on for a little while: @babel /preset-modules! A Babel preset that enables native async/await, Tagged Templates, arrow functions, destructured and rest parameters, and more - in 88% of browsers.
Tweet media one
15
284
953
@_developit
Jason Miller ๐ŸฆŠโš›
7 years
I spent a few weeks building a Preact compiler. IN: Polymer, Vue & Preact single-file components OUT: highly optimized Preact components
Tweet media one
28
243
935
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Wife mentioned the Ikea website seemed faster, so I checked and it looks like they are using Preact now ๐Ÿฅณ
22
44
925
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
#hottip : Make your layout fast & static by default. Turn on content-based sizing on a per-element basis.
Tweet media one
19
177
895
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
My reverse transpiler can now undo destructuring. Here it is reducing bundle size by 36%:
Tweet media one
24
73
886
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Introducing web-worker: Native universal Web Workers 1๏ธโƒฃ one import for web + Node ๐Ÿงฐ the same Web Worker API everywhere ๐ŸŽ uses worker_threads and native ESM ๐Ÿ•ธ zero-cost in the browser ๐Ÿ“ฆ works in npm modules
Tweet media one
14
197
885
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
the code we write ๐‘ฝ๐‘บ the code we ship
18
205
866
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Both Edge and Safari have Service Workers on by default in their respective next versions. Today is pretty great.
Tweet media one
9
291
816
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
Quick Tip: reusable Array search predicates via `this`:
Tweet media one
23
83
794
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
20ร— faster rendering is good, right?
Tweet media one
23
52
780
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
โš ๏ธ You probably don't want .innerText Why? It triggers layout! ๐Ÿฆ‘ This happens because the string contains newlines corresponding to blocks, and hidden content is omitted. ๐Ÿ’โ€โ™€๏ธ Solution: use .textContent instead.
Tweet media one
13
189
764
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
I have been working on an experimental ground-up rewrite of Preact's renderer. It now renders TodoMVC faster than hand-written vanilla JS. It's somewhere between 1.5x and 3x faster than Preact 10 (depending on VM optimization state).
27
74
775
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ Introducing Histore! [๐Ÿ—ฃ hisยทtoยทry] A 200b key-value store, persisted to navigation state. Supports complex objects, too! ๐Ÿฐ
Tweet media one
16
181
738
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ I'm excited to announce a new lib: unistore. A 700-byte centralized state implementation for Preact. Featuring: ๐Ÿ”Œ built-in data selectors ๐Ÿƒ pure component-bound actions โฑ simple, painless async
Tweet media one
21
177
739
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
I just encountered a 27mb JS bundle
87
22
744
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
๐Ÿง Hey! Wondering what Rome is? I tried it out. Here's what you need to know:
Tweet media one
20
192
734
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
All JS bundlers + runtimes now support Package Exports. As you add the "exports" field to your npm module, please remember: modules referenced via "exports" can include modern syntax. Adding exports is a semver-major change. It's a great opportunity to publish modern code too.
Tweet media one
16
153
729
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
I've been asked for a copy of my degree 4 times this week. I don't have one. Awkward.
46
41
713
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
HOT NEW SPA ROUTER FOR 2021
Tweet media one
25
48
722
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
๐Ÿ—Constructable Stylesheets are here!๐Ÿ‘ทโ€โ™€๏ธ TL;DR: Seamless reusable styles for components and elements. Shadow DOM. ๐Ÿ‘ load stylesheets asynchronously ๐ŸŽ apply them to shadow roots or globally ๐Ÿฆ„ no FOUC for loaded sheets
Tweet media one
17
239
721
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
I keep writing this useMount() hook. It's easier to scan for in code than useEffect. Basically my brain can't remember this: useEffect(fn) // run after each render useEffect(fn, []) // runs after mount
Tweet media one
22
114
718
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ“ฃ Introducing worker-plugin for Webpack! ๐Ÿณ Automatically compile and bundle Workers. ๐Ÿง™โ€โ™‚๏ธ No special syntax, no config. ๐Ÿ‘€ worker = new Worker('./foo', { type: 'module' })
Tweet media one
9
196
709
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐ŸฆŽย Greenlet: Move an async function into its own thread. (A simplified single-function version of workerize)
Tweet media one
23
206
697
@_developit
Jason Miller ๐ŸฆŠโš›
1 year
I regret using Tailwind for this mastodon client. I had kinda assumed it'd make things like dark mode easier, but so far it has just made initially throwing a view together slightly quicker at the expense of making everything else much more arduous/brittle.
53
27
700
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
npm now shows packages that have TS definitions
Tweet media one
6
83
692
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Want to import JS Modules from npm on @CodePen ? Check out this handy tip:
Tweet media one
14
198
676
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Does anyone else feel intense guilt if they attempt to relax?
70
93
674
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
What if you could have a full dev setup + server in a single 150kb JS module? What if that setup included ~instant Hot Module Replacement, JSX support, sourcemaps & friendly errors? What if you never had to run `npm install` and your node_modules directory was 0 bytes?
26
85
668
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
I feel so bad for anyone who bought a 2016-2019 MBP. Least reliable computer I've ever used.
105
32
668
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
The M1 Air should come with a keyboard heater. My hands are cold because the machine never gets warm
34
16
668
@_developit
Jason Miller ๐ŸฆŠโš›
7 years
The web is getting async image decoding! #IO17
Tweet media one
29
249
663
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
๐Ÿฆ„ SSR for web components! ๐Ÿฆ„ Declarative Shadow DOM is a proposed web platform feature that brings Shadow DOM to HTML. Try it in Chrome (experimental flag) or via a polyfill: ๐Ÿ‘€
Tweet media one
21
223
660
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
My reverse compiler project now recognizes and removes unnecessary polyfills. (and ponyfills!) (not shown: cascades and can even remove the wrapper function)
Tweet media one
24
62
654
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Just released Microbundle: zero-configuration bundling for tiny modules.
Tweet media one
Tweet media two
30
194
647
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
Wouter looks neat. 1kB, similar API to react-router but with hooks, works with both react and preact.
Tweet media one
7
129
649
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Today I failed to build a tweet-sized Virtual DOM library. *But* I did create this 480-byte one:
18
103
634
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Nooo one ships like Gaston JavaScripts like Gaston Pushes bugs to production then splits like Gaston
12
122
632
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
95% of the frontend code we write would be best expressed in a minimal template language.
66
30
618
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
who told you class components were dead?
Tweet media one
49
37
623
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
the amount of time I have to spend screwing up my already-working code to make TypeScript happy
44
27
604
@_developit
Jason Miller ๐ŸฆŠโš›
5 years
HTM 2.1 is out: ๐Ÿง™โ€โ™‚๏ธ @jviide rewrote it, twice. it's faster. it's smaller. it doesn't violate CSP. ๐Ÿฃthere's a new htm/mini version: <400 bytes ๐Ÿ—œyou can now compile JSX to HTM. Get those sweet Tagged Template gainzz๐Ÿฆต ๐Ÿ—Easy `htm/react` integration
Tweet media one
16
155
587
@_developit
Jason Miller ๐ŸฆŠโš›
7 years
๐ŸŽ‰ Preact 7 is officially out of beta! ๐ŸŽ‰ ๐Ÿš„ 10x faster initial render ๐Ÿ”ฅ 2x faster unmount ๐Ÿ› Key bugs squashed
Tweet media one
17
222
591
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Library authors: if you care about its size, take 30 seconds and install this Github action to run on PRs:
Tweet media one
13
120
592
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
๐Ÿ”ฅ The Google I/O site is built with Preact! โš›๏ธ
Tweet media one
11
77
578
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
Looks like Frontend Engineer is the #1 ranked job in the US for satisfaction.
19
49
564
@_developit
Jason Miller ๐ŸฆŠโš›
2 years
Just so it doesn't get buried: we built Signals for Preact, but it works in React too - even the fancy granular text updates! Just import the @preact /signals-react package.
Tweet media one
31
63
563
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
How to drop IE11 support while keeping your site accessible (including from IE): 1. Build your site to work properly without JavaScript. 2. Load JS via <script type=module>, which IE ignores Think about it: bogging IE11 down with 2mb of polyfilled JS reduces accessibility.
11
122
545
@_developit
Jason Miller ๐ŸฆŠโš›
3 years
๐Ÿ“ฃ It's now possible to publish modern JavaScript to npm and use it in projects without breaking older browsers. See how:
10
120
533
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
TIL: the Deno website is built with Preact ()
14
45
537
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
If you use CSS Modules, trust me: you want this:
Tweet media one
11
75
528
@_developit
Jason Miller ๐ŸฆŠโš›
4 years
tfw you find out someone already built a great version of the side project you'd been slowly hacking on
25
21
522
@_developit
Jason Miller ๐ŸฆŠโš›
8 years
Dang, `yarn why` is sweet. Tells you why you have a dep. Props @thejameskyle @sebmck @cpojer
Tweet media one
7
290
493
@_developit
Jason Miller ๐ŸฆŠโš›
7 years
stateMachineComponent(reducer, view) ๐Ÿ”ฌ tiny ๐Ÿ„ pure functions ๐Ÿ’ซ kinda reduxey ๐Ÿ”ฅ no binding! onClick={action(type)}
Tweet media one
Tweet media two
16
124
498
@_developit
Jason Miller ๐ŸฆŠโš›
6 years
Introducing... CSS Paint Polyfill! ๐Ÿง™โ€โ™‚๏ธ Use Paint Worklets in most browsers ๐Ÿ˜ + excellent performance in a bunch of browsers.
7
127
493