Magne Skutle(@mskutle) 's Twitter Profileg
Magne Skutle

@mskutle

Independent developer. Working mostly with React & Node

ID:158368970

linkhttps://mskutle.dev calendar_today22-06-2010 13:23:25

290 Tweets

132 Followers

239 Following

Tom Hicks 🫀(@Hicksyfern) 's Twitter Profile Photo

10. Margin is the devil

Use stacks, gaps, nesting and padding. The only good margins are negative margins, except in prose typography.

Literally no exceptions to this rule. If you think you've found one, you're wrong.

account_circle
Dominik 🔮(@TkDodo) 's Twitter Profile Photo

So my problem with it is mainly that it leaks styling. Consider:

const Foo = () => (
<>
<div>A</div>
<div>B</div>
</>
)

const App = () => (
<div style='flex' gap='12px'>
<Foo />
<div>C</div>
</div>
)

now the flex-gap leaks into the Foo Component,

account_circle
Cory House(@housecor) 's Twitter Profile Photo

In React, needless complexity and repeated null checks can often be eliminated via one simple pattern:

Return early when loading. Render *one* loading spinner until all fetch calls are complete.

Benefits:
1. The user doesn’t see a bunch of layout shift caused by multiple

In React, needless complexity and repeated null checks can often be eliminated via one simple pattern: Return early when loading. Render *one* loading spinner until all fetch calls are complete. Benefits: 1. The user doesn’t see a bunch of layout shift caused by multiple
account_circle
Cory House(@housecor) 's Twitter Profile Photo

'Every time you remove duplication, you add coupling.' - Steve "ardalis" Smith

So before eliminating duplicated code, I have to ask:

Is the coupling I'm about to create warranted?

Are the things I'm about to couple related?

Will this coupling make changes harder later, or easier?

account_circle
Dominik 🔮(@TkDodo) 's Twitter Profile Photo

components / hooks / types / utils (and constants) is the split I'm seeing in many codebases, yet it's the one I dislike the most. It groups by type, not by domain. 'useTheme' will live next to 'useTodo', but not next to ThemeProvider ... why?

components / hooks / types / utils (and constants) is the split I'm seeing in many codebases, yet it's the one I dislike the most. It groups by type, not by domain. 'useTheme' will live next to 'useTodo', but not next to ThemeProvider ... why?
account_circle
MrBeast(@MrBeast) 's Twitter Profile Photo

I’m gonna give 10 random people that repost this and follow me $25,000 for fun (the $250,000 my X video made)

I’ll pick the winners in 72 hours

account_circle
Magne Skutle(@mskutle) 's Twitter Profile Photo

I often see developers create reusable React components that return a fragment as its root element. Here's why that's a bad idea 👇🏻

mskutle.dev/blog/do-not-us…

account_circle
Magne Skutle(@mskutle) 's Twitter Profile Photo

What’s the best library for doing drag & drop functionality with React nowadays? Looking at dnd kit, which seems decent

account_circle
Magne Skutle(@mskutle) 's Twitter Profile Photo

Saved by stately XState again. The amount of complexity that simply vanishes when using state machines instead of booleans and if’s and else’s everywhere is astonishing 🤩

account_circle
Lynn Winterboer(@agilelynn) 's Twitter Profile Photo

Is High Quality Software Worth the Cost? Excellent explanation by Martin Fowler of and , quite accessible to people who aren’t coders. Recommend for and martinfowler.com/articles/is-qu…

account_circle