Freelance developer - React Query maintainer - Occasional OSS contributor - Been putting React on servers for a decade - Father of two - Homebrewer

Stockholm
Fredrik Höglund retweeted
Super mega overkill reply from @timneutkens, responding to a newbie’s question on what NextJs has to offer. Well worth a read! redlib.catsarch.com/r/reactjs/comment…
1
8
34
Fredrik Höglund retweeted
8 immutable arrays operations you should know 📝🤓 #javascript #es6
34
938
2,249
Fredrik Höglund retweeted
We've just released Relay 3.0.0! This is the one without Relay Classic.⚰ Doing so will allow us to experiment and iterate more quickly to bring you new APIs, like the ones with hooks, suspense and concurrent support. 🙃 github.com/facebook/relay/re…
3
19
103
This is such a cool idea! Visualize cross-cutting flows through, or slices of, your codebase by tagging comments. 👏
Replying to @ephemjs
@EphemeralCircle @iamstarkov @pascalgagneur I just finished first working version of github.com/Bogdan-Lyashenko/… It got few more big features from the last time you saw it on #react meetup ;)
1
By imposing the constraint of some leaf-parts of apps not relying on props (or context?) from outside components, could these in theory be hydrated first? Would this improve TTI more for parts of sites users expect faster feedback from?
2
The now being worked on partial hydration which aims to improve TTI by making hydration async necessarily hydrates top-down. The reason for this is that parents can send props to children. These two things feels like a clash.
1
1
Thought I'm toying with: For many server rendered React sites, much of the component-related initial JS-payload is there for preparing for later and rarer big-scale changes to the DOM. The fast changes where virtual DOM shines are often limited to smaller leaf-parts of sites.
1
1
I was wrong. While this did seem to work very well, it turns out it's a lot more complex than that. Replacing preload with prefetch can cause double fetching and other issues. This is a great writeup of all the nuance involved. medium.com/reloading/preload…
1
PSA: link preload starts downloading the resource right away at high priority, make sure you only use it for critical resources or you might be bandwidth-constrained. JS should usually use prefetch instead, download ahead of time, but at low priority.
1
3
Disclaimer: I have no idea what I'm talking about, or if it's at all possible.. This is just a fuzzy idea in my head, very hard to express in a tweet-format. 🙃
Then imagine combining that into a single declarative component-tree, where you can declare what gets included where (or determined by heuristic?). This gets built and optimised for all targets automatically. Goal is comparable DX to current component-based frameworks.
1
Imagine having several small React-apps at leaf-positions but with less overhead, and a templating-based approach above that, that can be rendered by either server or SW. React apps render on client, templates are rendered by server/SW.
1
* Kind of: Events that only redraw a smaller part of the DOM can get included as client-js and uses virtual DOM-diffing, events that redraw larger parts of DOM gets handled by server or SW (can be prerendered by SW) * Extremely light initial JS, fast transitions when SW is loaded
1
* The JS is compiled down Svelte-style * If events affect parts of DOM not included in client js-bundle, load from SW/server * From one component-tree, build and bundle for server, client and service worker
1
My wishlist for a trisomorphic-first framework: * Familiar component-model * Granular component-based routing, where some (leaf-)routes/components can be declared to be included for client * Only JS that gets output to client is event handlers and the above declared components
1
Fredrik Höglund retweeted
Next.js is getting more and more and more amazing, incredible! 🔥 nitter.catsarch.com/zeithq/status/10948824… @timneutkens is a beast 💪
Next.js 8: ⬩ Serverless Next.js ⬩ Massive build-time memory usage reduction ⬩ Build-time environment configuration ⬩ Prefetch performance improvements ⬩ Smaller initial HTML size ⬩ Faster Static Export ⬩ Security improvements nextjs.org/blog/next-8
2
16
101
Trisomorphic rendering is such an interesting concept. Very underexplored as of yet, but I think we’ll see more of it in the future, including abstractions. A bit simplified it comes down to taking a server+client-rendered app and also rendering it in a service worker.
"Rendering on the web": bit.ly/rendering-web ⚡️ - a performance-focused look at: 📡 Server rendering 📄 Static rendering 🖥 Client-side rendering 🛀 (Re)hydration 🚿 Partial rehydration & more ways to render pages 👩‍🎨
1
2
18
Happy hooks-day everyone! 🎉🎉🎉
2
I was just leaving @sthlmjs when I realised that the guy looking like my close friend from long dead wargames.unix.se / Dievo from 10 years back actually WAS him. Pretty fitting we’d run into each other at a security themed event after all this time..
Fredrik Höglund retweeted
What the team has been up to instead of releasing hooks. @acdlite @dan_abramov @brian_d_vaughn @threepointone @trueadm @sebmarkbage
13
26
437