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
React Server Components (RSC) differences to current Server-Side Rendering (SSR) explained by @ephemjs Listen to more deep insights: ep3.frontendgreatness.com #reactjs #javascript #webdev
5
4
Fredrik Höglund retweeted
React Server Components explained by @ephemjs Listen the full episode: ep3.frontendgreatness.com #reactjs #javascript
1
3
4
I wrote up an issue about code splitting in Redux in general here: github.com/reduxjs/redux/iss… I wrote up an issue on side effects in render in Next.js here: github.com/vercel/next.js/is…
Replying to @leeerob
Here is the issue! It's a complex one, but hopefully this describes it better than I could on Twitter. github.com/vercel/next.js/is…
Fredrik Höglund retweeted
Just had a really good Redux issue posted by @ephemjs , discussing what seem to be fundamental weaknesses in doing code splitting with Redux - it's unclear where to trigger reducer injection: github.com/reduxjs/redux/iss… Anyone out there have opinions / suggestions on this topic?
3
2
28
Fredrik Höglund retweeted
I'm having a JS discussion in Swedish with @ephemjs on @joinclubhouse this Monday “Javascript-snack på svenska”. Join us at 12.00 and let’s have a nice lunch talk together: joinclubhouse.com/event/M8NQ…
2
1
5
Actually, I want to make a stronger claim. It's currently impossible to use Redux or React Query with Next.js without relying on side effects in render, because that's the only way to hydrate data on the client on the initial render. Will be writing up an issue about this.
I think code splitting Redux reducers in Next.js is currently impossible without breaking the rule of no side effects in render. All examples and libraries I've seen relies on hacks. Has anyone seen a correct way to solve this? I argue it can't be done with current APIs.
2
8
It might be possible with getInitialProps, but that breaks other things and is not a recommended API now.
1
I think code splitting Redux reducers in Next.js is currently impossible without breaking the rule of no side effects in render. All examples and libraries I've seen relies on hacks. Has anyone seen a correct way to solve this? I argue it can't be done with current APIs.
2
2
5
This is a great video on Server Components and what a refactoring from a current gen app could look like.
1
3
Fredrik Höglund retweeted
My incomplete mental model for flexbox's main axis
25
503
2,430
Ouch..
TIL If you transpile both commonjs and es modules and publish w/ exports.require and exports.import fields and your code has state (i.e. you declare a variable outside of a function) and some consumer mixes calls require() and import in their app, then that state isn’t shared 🙃
1
Fredrik Höglund retweeted
Node injection is a function composition pattern used to achieve intra-framework transclusion. It often use named or unnamed node/children props which gets rendered to a slot (direct child) or outlet (further down the tree). It can be seen as a form of inversion of control.
1
1
1
Maybe something like that 👆? I'm aiming for language precision here as opposed to ease of understanding, so it's a bit hard to follow. 😅
Render props are another form of function composition that instead of a node passes down a callback to achieve parameterized transclusion. Component injection is related but is a purer form of dependency injection.
1
1
Feel free to comment if you don't have names for these things too! This is research for a possible project, so all input is valuable.
1
1
I've seen a few different names for this but I'm curious, what do YOU call this pattern of passing components down from higher up? What do you call the component that is being passed down? What do you call the "place" where it ends up in the tree?
13
12
Fredrik Höglund retweeted
"What should every frontend developer know about Server-Side Rendering (SSR)?" in 5 mins w/ @ephemjs. youtube.com/watch?v=ljcVcnOR…
2
2
I participated in my first podcast! 🎙 Thanks for indulging me and letting me talk about my weird passion - SSR. 🥳
The Frontend Greatness Podcast #3 is out! Listen to hear @ephemjs insights on: ✅ What should every frontend developer know about SSR? ⚛️ React Server Components (RSC) and how are they different from Next.js SSR? 🛠️ Best tools for SSR Full episode: ep3.frontendgreatness.com/
1
14