Sign in with Twitter

Username:

Dan Abramov @dan_abramov London, England

Working on @reactjs. I explain with words and code.

855 Following   156,507 Followers   56,338 Tweets

Joined Twitter 8/31/09


hey, starting February 2019, I am available for remote contracts to work on projects featuring Haskell, PureScript or Elm. DMs are open!
Retweeted by Dan Abramov
12/10
2018
@padolsey https://t.co/myAyZeQ5vk @_hardikmodha @kentcdodds You could theoretically call ReactDOMServer from inside ReactDOM, for example. Or can mix ReactDOM with ReactART.useEffect printing improvements are underway in prettier :) https://t.co/Kol0uhOGAz
Retweeted by Dan Abramov @revskill This is a good topic. I should write why this is usually a bad idea. @wSokra @TheLarkInn Thanks, will think more about it. I think some tradeoffs are acceptable for very uncommon cases… https://t.co/K1HSwlXxmT⚛️ New on Overreacted: How Does setState Know What to Do? https://t.co/XJ4ibNwINy
Retweeted by Dan Abramov @ProgramForAll No idea⚛️ New on Overreacted: How Does setState Know What to Do? https://t.co/XJ4ibNwINy @wSokra @TheLarkInn I think in practice it could be fine if 1. wrapping is unobservable (such as Proxy) 2. there's… https://t.co/LHiwlZ4Yef
12/9
2018
Know anything about applying for UK permanent residence? Asking for a friend. (Really.) He has some very specific q… https://t.co/maLbNJB89u
Retweeted by Dan Abramov @jkup I think it’s easier to motivate as problem solving. Sometimes I know a problem can be solved by writing bette… https://t.co/u4Y7dp6m33It works the other way too. Regrettable writing will haunt you forever. @jkup Depends on what your tasks are? I think for an infrastructure team both intra-team, intra-company and externa… https://t.co/psnB4LbGapOf course many posts aren’t lore-worthy. And writing memos is no substitute for engineering. But stories help build against chaos.There is a surprising power in writing things down. One of the biggest things I learned at FB. A single post can in… https://t.co/DD73azn9gk @wSokra @TheLarkInn Helpers are in https://t.co/ngHUQlpgXV @wSokra @TheLarkInn Thanks! I’m trying something similar except I do proxy wrapping at definition site. (Not sure i… https://t.co/rIoRx5isIo @ryanflorence I think the missing nuance is there’s many ways to end up with 600 KB. Some are “careless“ (include L… https://t.co/8IwUvrEyJ5 @wSokra @TheLarkInn Will think about it, thanks.I'm looking for advice and feedback on several docs structure questions. Please respond directly in this thread, in… https://t.co/tAnRa5yeaU
Retweeted by Dan Abramov @Swizec Oh wait. No it’s expected. Every time you render you get the same Promise and call .then on it. Then sched… https://t.co/CpePzX3mdK @Swizec Ah. Hmm. I’ve never seen useMemo used for Promises before so need to think a bit. File an issue to discuss? @Swizec The rules haven’t changed. Just because you use Hooks doesn’t mean you can put side effects like createCloud in render 🙂 @Swizec Why did you do a side effect during rendering?London, peeps! Is there any good, authentic, decently affordable Indonesian food here? #londom #londonfood #lazyweb #foodrecs
Retweeted by Dan Abramov @wxb0uKkIT6eJdIQ I’m bad with dates. PR?Also thanks to everyone who sent PRs to improve Overreacted! You’re the best. https://t.co/8ivEKkyzH7 @boriscoder We should also unify that with what RN does. @boriscoder That or something else. Probably doesn’t have to satisfy all of them but a good chunk. Especially re: correctness and locality.This is a slightly different format than other posts. More of a braindump than an explainer, really. I’ll likely t… https://t.co/o4lgLOtJpI🎁 New on Overreacted: My Wishlist for Hot Reloading https://t.co/PuLkZHIKjp @james_k_nelson No @jaffathecake @ianstormtaylor @samccone @_developit @tomdale @MatanLurey @bmeurer @HenrikJoreteg That’s not to say… https://t.co/5478WE7UPC @jaffathecake @ianstormtaylor @samccone @_developit @tomdale @MatanLurey @bmeurer @HenrikJoreteg You probably know… https://t.co/wTdK1Qq3ze
12/8
2018
@youyuxi @TheLarkInn @tomdale че происходит @wSokra @TheLarkInn To reiterate this for myself. The neat thing about this approach is that I have control over wh… https://t.co/dWL0BqUO1F @wSokra @TheLarkInn Sweet. I was just playing with something similar. Thanks. @btmpl @reactiflux We can rename to Render Phase and Commit Phase. I'm not sure why this is important though. @btmpl @reactiflux It doesn't help that prior to 16 there was no actual separation between two phases, it was intertwined. @btmpl @reactiflux I don't think we've been 100% consistent about this and the level of detail depends on the conte… https://t.co/NVEbI001Vt @wSokra @TheLarkInn Will think about it more, thanks. Here's a more detailed writeup on what I want. https://t.co/nhE4qSjfTk @wSokra @TheLarkInn As a tool maintainer I know how annoying it is when people try to cheat and do something you’d… https://t.co/fWJvwRd8G1Our Sonemic Selects: 2018 @Spotify playlist has been expanded with more high-charting favorites, including… https://t.co/4XBzSbxT0B
Retweeted by Dan Abramov @wSokra @TheLarkInn Is there any lower level API I can use to hack around this? @wSokra @TheLarkInn That usually works. But for cases when it’s not sufficient (I can only know for sure on the go)… https://t.co/QV7MkaAlZF @wSokra @TheLarkInn I understand ideally self accept is only for cases without exports. But that’s not very practic… https://t.co/BKDVRZd3zO @wSokra @TheLarkInn My goal with using self-accept is to reexecute as little as possible. Ideally it’s usually just… https://t.co/GckpWPmnSc👋 Do I know any @firefox engineers that I could talk to about this bug? https://t.co/02wawFMNsb The inability to… https://t.co/K2otUYHAE6
Retweeted by Dan Abramov @MarijnJH @jashkenas Also cc @left_pad who dealt with this in Babelstill one of my favorite bits of writing about programming culture, by @ftrain, because i think about this topic al… https://t.co/KvbyyUILCB
Retweeted by Dan Abramov @natebrady23 @sophiebits @MikeSmithTE (That said you can keep [] if you’re aware of pitfalls and only use the updater form or dispatch). @natebrady23 @sophiebits @MikeSmithTE Yes. @natebrady23 @sophiebits @MikeSmithTE There is a way to avoid resubscription with a ref. But can you demonstrate th… https://t.co/ctO53Gc3D7 @natebrady23 @sophiebits @MikeSmithTE It’s [] that feels wrong. 🙂 Why did you use it? If you include second argumen… https://t.co/vMUOAufbOI @gpblv @mjackson That’s your decision but not everyone can refactor thousands of components @TheLarkInn @wSokra Yes. Which is how it (AFAIK) behaves if you don’t accept. In other words I want to abort an on… https://t.co/GM1u4PGWRQ @MarijnJH We have a similar problem in React with scheduling. I liked @sebmarkbage’s conclusion is it might be easi… https://t.co/SXU7BIOnBP @wSokra cc @TheLarkInn maybe you know @wSokra In other words I can’t guarantee self-accept() is successful until after it ran. But if it wasn’t, I’d like… https://t.co/GJLVoxQ9Vn @wSokra Is it possible for a module to start self-accepting, but in the middle realize that it can’t, and fall back… https://t.co/jkfVkRzBXy @btmpl @rickhanlonii There's a codemod for that btw @mr_googly_eyes oooh i like @mr_googly_eyes Actually not! Will check out thxI’m so effing grateful for this post A CS concept taught through @ArianaGrande lyrics 🙌🏻 @ASpittel, this is *so*… https://t.co/a9C5zqcFqO
Retweeted by Dan Abramovalso lol https://t.co/sFZzE2cwbwI guess I’m officially in the cult now https://t.co/aKvxiMCSknMy top 100 this year if you’re into a mix of melancholy hip hop and pop ballads https://t.co/BllIv3jDwFAnother day, another case when someone was frustrated that getByLabelText want working for them and then they reali… https://t.co/OHmkJF1VeZ
Retweeted by Dan Abramov @swyx @JaapFrolich @BrettJephson @reactjs Posted a more specific reply here: https://t.co/pbODS9GZLq @BrettJephson @swyx @JaapFrolich @reactjs If that state depends on something I can only know during an effect, sure. @threepointone Who are your audience? I think this thread gives a lot of insight on why people struggle with it — i… https://t.co/CbBKoIrBPd @swyx @JaapFrolich @BrettJephson @reactjs I think it’s important that YouTube videos people find as they learn this… https://t.co/WXrDpD4aXi @swyx @JaapFrolich @BrettJephson @reactjs Finally this has nothing to do with either Hooks or concurrency. You’ll h… https://t.co/soG41cedxk @swyx @JaapFrolich @BrettJephson @reactjs Or useReducer which lets you avoid fiddling with many state variables and… https://t.co/JOgmVR445r @swyx @JaapFrolich @BrettJephson @reactjs If you must have two for some reason, another potential solution is var… https://t.co/OUWOMWWzDm @swyx @JaapFrolich @BrettJephson @reactjs If one state variable is always f(another state variable) then you should… https://t.co/b171MXjuON @swyx @JaapFrolich @BrettJephson @reactjs I don’t recommend either of these approaches. You’re trying to sync two s… https://t.co/96e80LztxD @rem @whymclovin Alternatively an easier one is just useEffect(doSomething, []) Specifying empty dependencies arra… https://t.co/AukLCCXn4e @rem @whymclovin Same answer as https://t.co/9N074u7Vyy but in reverse @btmpl NiceAfter talking with @dan_abramov yesterday, I've updated our large-ish codebase from React 15.3 to 16.6 with codemod… https://t.co/idFZxFz36f
Retweeted by Dan Abramov @btraut @mjackson If you like rewriting your apps every once in a while then sure, you can treat it as "deprecated"… https://t.co/wdOp9S41df @btraut @mjackson Deprecated means it will be deleted. Which means you'll have to change your old code. Sometimes i… https://t.co/2KVxfjEMkD @tarang9211 @mjackson Replied — you don't need state for this at all https://t.co/TAHYWXjmWtnpm co-founder @seldo took stock of what 2018 meant for javascript and made some bold predictions about the year to… https://t.co/YMcpNpWUxx
Retweeted by Dan Abramov
12/7
2018
@raquelxmoss lol I also have Liability https://t.co/U7kFVqyfEQ @elihrobinson It’s not going to happen automatically. This article explains a pattern _you need to apply_ for gette… https://t.co/djr7ZgKAiy @lmatteis @tlakomy @erikras You can start with any <thing> and trace its props upwards to that setState (potentiall… https://t.co/2WlhXcffeP @elihrobinson Very unidiomatic in React and I don’t see what problem this is solving @probablyup @iamclaytonray @mjackson This conversation won’t be productive if you ignore the blog post though. We p… https://t.co/guhEiP3RvE @probablyup @iamclaytonray @mjackson Did you read the blog post? It points out specific examples (which match most… https://t.co/2E9WhAmwH4Announcing Emotion 10!! 👩‍🎤 - zero config server rendering - css prop without a babel plugin - Global component - a… https://t.co/sbn6IYvQ1y
Retweeted by Dan Abramov @aycheps Measure and see what works best for you @_pier React repo might be a good place @Abhi17z No difference @_pier Maybe file an issue to discuss?No matter if you use Elm or not, but just studying some Elm libraries will provide so many interesting insights int… https://t.co/9JV851PrUN
Retweeted by Dan AbramovSo many feelings. Thank you everyone! https://t.co/kgxXiEfd4e
Retweeted by Dan Abramov @timurtu For function components you don't need defaultProps. Destructure props argument and use default values. F… https://t.co/0AXTs2AuY7
12/6
2018

0