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

Stockholm
I love that I’m finally hearing talks about the elephant in the room that has been React SSR in conferences. #ReactAmsterdam
2
5
”Shawn @swyx Wang is an amazing person” -@kentcdodds speaking the truth at #ReactAmsterdam
1
16
I see this waterbottle as a sign I’ll learn to write intense single page applications at #ReactAmsterdam
4
The hype is real, #ReactAmsterdam, here I come! 🚄🛫 DMs are open if you wanna meetup and have a chat.
3
Fredrik Höglund retweeted
In Chrome, any JavaScript files in a service worker cache are bytecode-cached automatically. This means there is 0 parse + compile cost for them on repeat visits. 🤯 v8.dev/blog/code-caching-for…
17
382
1,325
Before someone suggests it, no, I don’t consider: { ...(condition && { key: ”value” }) } to be very nice. 🤷‍♂️
I just rememered what a hassle it used to be not having default parameters in JS. 😱 Now can I please have a nice way of conditionally adding keys to objects when declaring them with literal notation..? 😘
1
#React reserves the right to evict useMemo-memoization. This means useEffects relying on this can rerun at any render (hence the synchronisation mental model rather than lifecycle). I wonder how it (will) avoid endless loops when evicting? 🤔
1
1
#ReactJS Server Side Rendering (SSR) is a performance bottleneck for web backends. @davidmarkclem will demonstrates a very simple solution that can be dropped into pre-existing React applications to vastly improve the throughput of an SSR #NodeJS server: buff.ly/2HfakCk
1
5
4
Me, fetching only on mount: "Trust me, I KNOW these props never change" useEffect linting: "Prove it to me, add them to the dependency-array" My app after adding them: "Lemme do an endless loop to prove you got memoization problems" React Hooks keeps unearthing bugs. 🙏
10
Fredrik Höglund retweeted
Been having conversations with many companies this week and it appears React SSR is a major performance and stability issue out in the wild (both server-side and client rehydration). Better tools, methodologies and documentation are desperately needed.
5
6
62
This is usually frowned upon, but given the constraints of Redux and React I think it's currently the best choice, or ergonomics and complexity would suffer. Suspense solves this for data fetching, maybe it does for the normally synchronous cases too? 3/3
1
1
Like with data fetching, the first breaks co-location of requirements with components and second isn't friendly to streaming. Since injection is synchronous there is a third option though, injecting them as a side effect during the render phase. 2/3
1
Dynamically injecting Redux reducers with SSR has a lot of parallells to data fetching. Children rely on data/reducers being available when they render. Just like with data fetching you can hoist reducers so they are known before rendering or have multiple passes. 1/3
1
Today, @googlechrome is hangin’ with @reactjs talking schedulers. Super fun day!
2
13
289
Fredrik Höglund retweeted
Very flattered by the fact that PriceRunner once again has been awarded by Topp 100 2019 as the Best Comparison and Search Site 2019. Outstanding colleagues have done a outstanding job to help consumer discover better products and save money topp100.idg.se/2.39772/1.715…
3
9
Fredrik Höglund retweeted
😮 The CSS Working Group approved CSS Nesting — which now has early Working Draft in Stage 1. Wohooo! 🎉 The following will hopefully soon work in vanilla #CSS. ```CSS div { & p { color: tomato; } } ``` 🙌 Your thoughts/shares/retweets welcomed!
97
1,076
2,833
Heard on @verybadwizards: ”Anti-Natalism is the ultimate in the venn diagram between emo and analytical philosophy” I can’t stop laughing. 😂
Really well explained blogpost about closures and how class and function components differ in how they keep values around for later. I like to call closures ”huggies”; they hug and keep the values close for when needed. Easy to remember what they do and less scary. 🤗
2
19
97