Sign in with Twitter

Username:

Dan Abramov @dan_abramov London, England

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

874 Following   173,395 Followers   59,376 Tweets

Joined Twitter 8/31/09


Note: any resemblance to a real API is accidental. I didn’t realize people would pay attention to the code snippet… https://t.co/neR8FrIhaY @_jayphelps @BenLesh Yeah it’s not even a Relay API as I already heard from Relay folks 😅 @BenLesh @rbuckton Sorry, this is a completely made up example, the only relevant line of code is the last one. I’m not showing any API. @xander76 Please leave feedback and ideas on the PR, then I won’t forget about them! @sebmck Outside variables that are nevertheless within the component, I think. https://t.co/3CKux7o3ux @xander76 The only mutation the rule supports is through React refs. Those have a "current" property. The rule won’… https://t.co/ANO4w7SDpK @xander76 If environment doesn’t change referentially but environment.userId does it means it was mutated. Yes, in… https://t.co/u4MOnzeH2N @_pier Seems like a lint rule with autofix is a nicer way to iron out edge cases where suggestions are wrong than breaking people’s code @Sam0sval https://t.co/9CY35jiQ2C @kevinwolfcr To be clear this doesn’t represent any actual API (and I got a word it‘s not Relay). I just edited rea… https://t.co/IOxMekgnE7Just finished watching. 😢 This avclub comment captures my feels https://t.co/PMXVDtZwg3
2/16
2019
@brian_d_vaughn @tesseralis Gotta ship something first. I think this is viable. @wintorez YesThis post is dedicated to @brian_d_vaughn and @sophiebits📝 Fix Like No One’s Watching https://t.co/D3NVgOpQCTIn looking at a #VueJS PR today, I realized I now confidently understand why linting yells at us to include a `key`… https://t.co/dwTL4KosHr
Retweeted by Dan Abramov @ltm Could be one of these changes in 16.7 https://t.co/643aQsB0aK @TheLarkInn 🤨 @ltm 16.8.0 or some patch? @kevinwolfcr I think so @geteslint @calebmer @jamiebuilds @sebmarkbage Okay, first version you can actually try is here: https://t.co/AIY7mzTFn5We try to be more responsive on Pull Requests and merge or give feedback faster. The best side effect of this is th… https://t.co/eeLNcTjXp9
Retweeted by Dan AbramovFirst alpha of the new "react-hooks/reactive-deps" rule is out! It autofills the deps array for Hooks like useEffec… https://t.co/5NbHk9f8ZvApparently some people think “React” means “the stack twitter used”. React has normal buttons. You render them like this: <button>
Retweeted by Dan Abramov⚛️ It's time to kick off the 20th This Week in React: 🔥 134 New First-Time Contributors 🔥 🌍 20 New React Internati… https://t.co/3uLvduqREc
Retweeted by Dan Abramov @v_schroeder https://t.co/7qtBVWA5sCI did a video-tutorial about optimizing rendering performance of React applications using Profiler from React DevTo… https://t.co/XdIGVFzm7u
Retweeted by Dan Abramov @demigor useEffect doesn’t flatten anything. Needs to keep size so we can reliably compare previous and next values.Imagine living your personal life such that you never took (or were allowed to take) any action unless you could fi… https://t.co/1JJEDiq2YO
Retweeted by Dan Abramov @TheLarkInn @webpack @callumacrae Curious what kind of misinformation you’re running into @_hot_sizzle Sorry, still don’t get it. CodeSandbox demo would help. @JonathanYehie Not quite sure what you’re asking. Specific examples? @ILeG3nDz https://t.co/WgDnGyMdcf @timonweb @kentcdodds @eggheadio Don’t miss custom Hooks 🙂 @_hot_sizzle I don’t understand what you’re asking.Thanks so much to everyone who joined the livestream today! 💜 Huge thanks to @chatsidhartha for teaching us all abo… https://t.co/NTA4dmkumJ
Retweeted by Dan Abramov @cpojer @exponent @stratechery I love listening to the Morning NakazawaThis post is now translated to Simplified Chinese by the community! https://t.co/90GCWjH6tD https://t.co/ctCEDejYqg @elie2222 @jamiebuilds @sebmarkbage Yeah we never recommended that one @MTesini https://t.co/XtmTKaqwbN @Joelbdenning @kentcdodds As comments on that issue say it is supported now (since 16.8) but there are bugs. Unfort… https://t.co/pXDiXA488k @donavon @mossar_pl For sure. (Which is usually buggy.) @Omega_ @mossar_pl I’m working on a lint rule that autofixes this. But personally I think you get used to it pretty… https://t.co/3iypzLkcBa @andrewingram @acemarke @WebReflection @jkup @angustweets @MozDevNet Don’t tempt me @johnwineman @jamiebuilds @BenLesh Ok I’m done with this thread byee @johnwineman @jamiebuilds @BenLesh Definitely useAss() @Joelbdenning @kentcdodds If it doesn’t then we’d appreciate an issue! @Joelbdenning @kentcdodds I’m not saying you have to try it without Enzyme. I’m saying Enzyme already uses it (and… https://t.co/dbkPIIs6qL @Joelbdenning @kentcdodds I think you mean react-test-renderer/shallow (that’s where shallow renderer lives). Enzym… https://t.co/vjRGCvx1cz @Joelbdenning @kentcdodds Shallow rendering works with Hooks @wesgrimes @jamiebuilds @BenLesh https://t.co/3Ox5DsiGUO @jarretmoses @timonweb They don’t enforce small components at all though. (Although they help you at that.) I think… https://t.co/IecbD0Cw7R @E_L_Pol @timonweb @vuejs (On a serious note though... I’d love to hear why it’s not working out for you and if the… https://t.co/ai4FyUjH3c @E_L_Pol @timonweb @vuejs I regret to inform you but https://t.co/OBU5t7wG4h @andrewingram @WebReflection @jkup @angustweets @MozDevNet PRs welcome yo @mossar_pl Except this code is buggy (and this is exactly why useEffect takes an array). Your array should be [id]… https://t.co/UvJtekGvNf @jamiebuilds @BenLesh It should eat ass insteadThis Valentine's Day send love to an open source maintainer since they're probably spending tonight alone closing issues as not reproducible
Retweeted by Dan Abramov @agedjus It’s the other way around. useEffect gives you something new. useLayoutEffect semantics match componentDid… https://t.co/oKiwwDRDFj @eirikurn @timonweb @albertgao In particular, the recommendation is to keep things that change together as part of… https://t.co/kusm3xTAae @eirikurn @timonweb @albertgao I wouldn’t say it “encourages” that any more than the let statement “encourages” you… https://t.co/YRptjEXe1d
2/15
2019
@kmsaldana1 Nice! Seems like with useMemo() it could be ever simpler? https://t.co/LZI2roViB6 @ryanflorence ryanflorenceexplained https://t.co/ZL7TlEnY0v @threepointone Please bear with us as the RN stable release is being prepared. We’re still getting a few bug report… https://t.co/4SWeRoh25N @_xaviergonz @sebmarkbage I don’t think that question is relevant to what we’re discussing. We’re discussing elemen… https://t.co/pHiX3cSFETThis part didn’t fit into my screenshot but I bet a lot of people will thank @threepointone for it! https://t.co/n7fa4wWks0 @_xaviergonz @sebmarkbage Yep but if you write them in JSX I inline they’d usually be different on every parent renderWe cut a 16.8.2 bugfix release today. With 💙 from the React team. https://t.co/htxj53RgU5 https://t.co/Y6mpirj4we @_xaviergonz @sebmarkbage It happens in any case where children is referentially equal. So yes, it works with class… https://t.co/kAG6IWizoe @theomn @adrienneleigh Understandable @adrienneleigh @theomn If you’re curious about our next steps there, this might be interesting https://t.co/fHqzmeOn6z @adrienneleigh @theomn Sure — I just wanted to mention React is not synonymous with client-side rendering. Even if… https://t.co/3eHz72CDQq @adrienneleigh @theomn Overall it’s a completely valid criticism that client-only rendering is subpar. I agree with… https://t.co/6re8b015FA @adrienneleigh @theomn The number of people who turn off JS is very low (much lower than the number of people who n… https://t.co/m4gtVSsrny @adrienneleigh @theomn I don’t want to get into a debate about client rendering — although you can serve React apps… https://t.co/eRQvOEjzOZ"Is there an error message that’s too obscure? A configuration option missing a sane default? A sentence in the doc… https://t.co/BA6ugDwRKp
Retweeted by Dan Abramov @adrienneleigh @theomn I used to think this too but this talk convinced me otherwise https://t.co/HsM7BprCf6 @reactjsdevelop @reactjs @ReactJSNews That’s not really idiomatic React. Maybe this could help? https://t.co/sljk8KCwLJ @ryanflorence @sebmarkbage Ye @jamiebuilds @sebmarkbage It would be great to have this pattern in "Optimizing Performance". Tbh that whole section needs a revamp @quentin_smr @sebmarkbage Yes @jamiebuilds @sebmarkbage I almost think we should publish a list of lint rules that we *don’t* recommend people to adopt.. @quentin_smr @sebmarkbage They’re passed from the parent. React knows Foo couldn’t have changed them because it ren… https://t.co/H3yNnY3hyTThis is a little known React optimization pattern. React rerenders this component deeply when updateX is called, an… https://t.co/nFnIfRamFO
Retweeted by Dan Abramov @quantumumi yep @timonweb @albertgao Re: concurrent mode, I highlight that because Hooks are optimized for *next* five years of Rea… https://t.co/1Sm2aj8c1u @timonweb @albertgao I see where you're coming from but consider that - in concurrent mode this will "just work":… https://t.co/2qRNr2tXF9 @timonweb @albertgao This doesn’t sound right. Repro case? The only case in which that would be expected is if you… https://t.co/7NaS8Q8MwK @sebastienlorber @atomarranger For sure. Sorry I feel guilty that rule is still WIP. Jumping on it today! @timonweb @albertgao That’s not quite right. Inside event handlers calling setState multiple times triggers just one render. @timonweb I think you might be overfocusing on unfamiliar aspects. Beginners in my experience actually find the mer… https://t.co/aYrn0A5a0UWe've been busy reading your CFP submissions but we're excited to announce that...🥁 EXTRA EARLY BIRD TICKETS ARE O… https://t.co/5IOp2i8VZJ
Retweeted by Dan Abramov @timonweb I also noticed editor highlighting for class methods messed with my brain a little. It felt wrong to not… https://t.co/16wRrmUxYk @timonweb Yeah that happened to me too when I tried to convert code. Didn’t happen when I wrote from scratch becaus… https://t.co/kfsEKV7LY3 @j_lybeck Show me the code? @timonweb Luckily in that case Hooks should help you extract some of that. @timonweb There’s also an interesting psychological aspect here. Putting too much stuff in a class feels okay. But… https://t.co/WDqFCoGvHx @atomarranger @sebastienlorber Reason: you might eventually make setter itself different, like const setValue = co… https://t.co/VBaQRK9ZMw @vvikingson Haven’t looked in detail but the whole notion of “syncing” props to state is usually unnecessary and bu… https://t.co/h100P2jDn3 @timonweb Do you mind showing some samples? Also, did you *convert* code or write new code with Hooks? I’ve noticed… https://t.co/ThP50QK7Rc
2/14
2019

0