Sign in with Twitter


🎹 Pianist | 💻 Software Developer @microsoft | 👨‍💻 React, CSS, state machines, animations | 🎥 @keyframers | 🚀 Creator of XState

1,774 Following   23,840 Followers   9,871 Tweets

Joined Twitter 12/6/12

@argyleink @greensock Do you really trust JavaScript to handle numbers between 0 and 1 @argyleink cc. @greensock 👆 AnimeJS: milliseconds Popmotion: milliseconds Velocity: milliseconds JS/WAAPI: millise… @TaelurAlexis @rickhanlonii CSS-in-HTML-in-JS-in-webpack
@jplinnell Nope! I've done it. @TheLarkInn @sarah_edo The best webpack configs are the ones that are never seen @PardonMusings Curious; why didn't they want to use XState? Size concern? @rickhanlonii That literally sounds like the dream @kai_cataldo @TatianaTMac This joke scalesIf you learn C# it's actually a two-fer bc you automatically learn D♭
Retweeted by David K. 🎹Quarantine day 3: "How do I remove an element from an array again, I should know this" Quarantine day 17: "In th… had a dream last night where I tried to convince @DavidKPiano that Spotify was too complex to be modeled by a sta…
Retweeted by David K. 🎹 @nullvoxpopuli @vitalii_akimov @sompylasar @dan_abramov I've muted him btw, he makes the same troll-y arguments all the time. @kristinatastic You won't! I will still never understand how tables can be made out of coffee, but I won't let that stop me from learning! @rickhanlonii 😂 Also, they've been using state machines to create abstract models of their systems for model-based… @sophiebits You're talking to them. I'm taking the concepts from it and using it in the next version of useMachine() in xstate/react! @sophiebits No useReducerWithEmitEffect? ☹️
@emiliacodes I don't know if I can do that Emilia @trevorbrindlejs @LeifTheTank 9, 9, 9 @ryanflorence I did one and declared myself comfortable @rauchg There's a few of us slowly trying to bring the trend back to mathematical modeling! cc. @hillelogram @cassiecodes I need to tattoo this to my arm because I always make the mistake of thinking things are harder than they really are.It's amazing how often the difference between "I'll never understand how to do this" and "I'm pretty comfortable do… @chautelly @kylemathews Right; not a lot of magic, but quite a few graph algorithms 😅 @dan_abramov @lmatteis This kind of thing needs an animated explanation 😉 It does make more sense though! @danielk_cz @kentcdodds @dev__adi @hnordt Because the vast majority of APIs are still based on REST? @kentcdodds @dev__adi @hnordt Right - mocking fetch in tests doesn't change the implementation code, so it's good.… @kentcdodds @dev__adi @hnordt Yes, but less invasive. The implementation code (IMO) should assume that it's actuall… @dev__adi @hnordt @kentcdodds Yep! @argyleink Your Lego sets don't assemble themselves? You must have gotten the knock-off ones @dan_abramov I'll DM you some counter-examples. @argyleink The Lego pieces are only half of the story. The other half is the freakin' instruction manual that show… @dan_abramov Async/await is a state machine*. It's just the *wrong* state machine more often than not. * (as in it… is a perfect example of an "implicit state machine". There are two states: ⏳ Awaiting... 🏁 Resolved!… @hnordt @kentcdodds That's what an interceptor is for. @hnordt @kentcdodds Avoid mocking. Don't put any test-specific code in your implementation. Use an HTTP interceptor… @rafalfilipek Me and yes 🙂 @rafalfilipek Yep! @lmatteis Hah I've read this before @dSebastien I dig it - many people do it in a similar way. I'm personally too lazy to do the whole namespacing thing 😅
@kyleshevlin @fizzbuzzfoobar In React, at least for now, it's a little unnecessary, because components are essentia…'ve written ~3k words today to create some guidelines on how to write and use state machines and XState with React…
Retweeted by David K. 🎹 @markdalgleish @colmtuite My kingdom for a design tool that just has a really good grid editor/component @juanstoppa @ascorbic Glad you enjoyed it! @ascorbic Let's see how much I can get done this weekend. It's available on the `viz` branch if you're really curious.This is really cool! The upcoming XState visualizer component (not shown here) will make these graphs look a lot ni… @andrew_bytes Deck not found! :( @kyleshevlin Happy to help in any way! I've talked about them in depth with @callmevlad and @iammerrick 👥 @scottsilvi Here is a more thorough answer: @scottsilvi Sorta, but it's much more than that. Redux: lets you change state due to events XState: lets you chan… @ZeeCoder That's not more declarative; you're just tying app logic to routes, which makes it more difficult for you… @thekitze We're now on the opposite end of the spectrum: "what if one single frontend, that also covers the backend" @noori_zakarya @iboum No but it's well worth the price. It's my go-to font! @mattgperry @thekitze It seems to complete the animation before going back, or maybe that's because of the tap delay. @mattgperry @thekitze I'm trying it on mobile, no luck @thekitze @mattgperry Lol, what if you want to make this animation interruptible? @iboum I dig it! You can think of each of those functions as a "proxy" for dispatching a specific event. @tjallingtolle @sebmarkbage Ehh, I like @dan_abramov's argument for why it should be the other way around:…, just realized that the tuple order of [startTransition, isPending] = useTransition() seems a bit... backwards… @samselikoff Getting faded here too @SoulSizzleDsgn Good to hear! (I should make another tip on this) In reality, effects only happen due to "events"… @asvny_ Looks like you're making a custom useMachine() hook. Peek into the source of xstate/react and compare your… @Gr3gfletcher I have some in this post: specific example will look different with the useTransition() hook, but that's still experimental and we're no…⚛️ React tip: for many custom hooks, this return signature: [ received, send ] = useSomeHook(...) is really versa… @CodingDive In the next minor version, we'll provide an easier way to conditionally apply actions! @azoicx I shouldn't read tweets after working nonstop for 10 hours 😶 @azoicx Ohhhh okay! 😅 Thank you!
@aweary 42 (number) "hello" (string) { foo: 'bar' } (object) [1, 2, 3] (array) <Something /> (literally no idea anymore) @hrafnkellp Thanks for sharing! Link to the stream? (Do you know if it will be recorded?) @dan_abramov @thekitze I'm going to create an open-source project for deploying podcasts on baking playable bread instruments an…👨‍💻👩‍💻 VS Live Share is the Zoom of remote code collaboration (with better security). You can even join a Live Shar… @elijahmanor Just gotta say, that is a BEAUTIFUL object structure. 😍 @kentcdodds @kylemathews You mean: I'll release it as a library that anyone can use anywhere 😉 (and also a blog post) @kylemathews Short answer: yes 🎉 Long answer: I'll DM you ✉️ @elango_dev I'd love to see it! @chantastic If there's one thing I can do, it's multitask
@eggheadio The 9 AM - 5 PM parts @elcarpie Awesome! Is this deployed anywhere online so we can see the end result? @derique_ @SeanAguinaga That's a React question, not an XState question. Make a custom hook that wraps useMachine a… is April 2nd. So is the day after that. Normal date enumeration will resume on April 3rd. Have a great March 47th. @h_yeomans @keyframers @el_keogh That's a @shshaw question, he's the man behind the curtain
@SeanAguinaga Where are you seeing too many re-renders? Can you post a CodeSandbox? @irvingv8 @excalidraw Flux is the LaCroix of state machine flavor @dr_sensor @excalidraw I don't want to scare developers away from FSMs 😅 @Veinq_ Hey, I haven't yet but would love to adapt it and make an xstate/svelte package. I'll make contributing do… @eunjae_lee Really cool! I'm looking into how we can bring hierarchical states into xstate/fsm and keep the size below 2KB. @brian_d_vaughn If only there were some really old computer science fundamental concept that made these kinds of things impossible @lbineau @excalidraw Check out this post by @geddski on animations with state machines: @HenryTabimaG Great to hear! @ThomasBurleson Using "actions" to mean events is confusing. I'm just going by the original terminology instead of… yes, the proper term for side-effects (in computer science and state machine terminology) is "actions". Redux…🖌️ I made a cheatsheet for event-driven finite state machines with @excalidraw! This describes the basic important… @SharpeMartha @kentcdodds (confession) I've never used axios, you're not alone! fetch() works just fine for me. @ken_wheeler Is that poop emoji using a bidetBus factor, pair programming and Visual Studio @code Live Share with @DavidKPiano Video on YouTube:…
Retweeted by David K. 🎹
@AndaristRake @mjackson Alright, I deleted it, it was a bit harsh, I actually think that Redux Saga made Redux a lot better. @AndaristRake @mjackson Haha, sorry - yeah I know, but they're implicit and restrictive! @tlakomy Is this concurrent mode safe though @chriswearshats @matthewcp Is your use-case that the only code that will call this service is that service's code i…