Sign in with Twitter


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

1,921 Following   27,303 Followers   11,490 Tweets

Joined Twitter 12/6/12

@mpocock1 Fears aside, that's an awesome position to be in. Anyway, infrastructure (esp. with managing secrets, en… @DrBob5188 @wallabyjs Finally, somebody noticed it! 😉 @athammer_ They have different goals - Recoil encourages changing state directly which is not robust. But I'm explo… @mundanedetail @housecor You answered your own question! The missing part is "drawing the lines", or the transitions, between states. @swyx @wallabyjs It's great! Before, I was using the browser console as a REPL... But using the IDE makes a bit more sense. @infinitelychriz @wallabyjs Oh, that's cool! Does localeCompare do ascending or descending though? That's what always confuses me. @AdamRackis Also, I'd love to know what's holding you back from trying it (besides the learning curve) - setting it… @AdamRackis It shouldn't! The latest XState/react@next at least works fine with StrictMode, but since it handles st… @drwpow @wallabyjs I did too until I realized I still get a-b and b-a wrong 50% of the time
@ben_eb @wallabyjs Yeah, (a, b) is definitely more common but doesn't help my mnemonic 😜More details on how array.sort() works: I visited that page way too many times, which is why mnemonic devices help.🔢 Quick tip: if you're sorting an array in JS and keep forgetting how to write the compare functions (like I do), h… @BabyKGar @housecor This pattern applies to any framework, and almost any language even! @mpocock1 Oh, this part's already working! Just need to tweak some things and get it working with server-side machines, as well. @mpocock1 22 daysBurnout is not being able to utilize your skills.
Retweeted by David K. 🎹 @housecor @Ludviguy @PardonMusings Right. I like expressing logic in plain terms, so if someone asks me "What's the… @housecor I call them "state enums", but yeah, this is one of the primary use-cases for enums, which I wish were na… @leewarrickjr I traded a Smith machine for a state machine
@leewarrickjr Yep, so glad I invested in one a few years back @ericclemmons And they had a statechart implementation built-in! @stolinski cc. @mjackson @buildsghost I wonder the same thing @shortdiv @FrontendMasters @1Marc Congrats!! Definitely going to watch this course. @flybayer 🙌 @steveruizok Just realized I'm basically describing Git 🤦‍♂️ @steveruizok I've been thinking about versioning for statecharts (might be similar) - in theory, if you represent *… @gertig Put it this way: if you think the current visualizer is useful, you're in for a treat. @gertig A lot of it is ready; just needs some polishing. For every new feature I complete, I think of 5 more that would be amazing to add. @dizzyd 💜
@filearts @swyx All of them @buildsghost I wish I could favorite a tweet harder @sebastienlorber @swyx Nope, never a problem. @swyx Every time I've tweeted about it, I get a lot of pushback and disagreements. I've been using * { position: r… @swyx Let's just apply the awareness to all the days In all seriousness, it's more contentious than CSS-in-JS at t… @swyx You can solve the rest of them with position: relative @steveruizok Library or home-grown? @acemarke In that light, XState is not a state management tool, but a state orchestration tool, which makes all the… @chancethedev @ryanflorence (same) @jdan @jongold Err that's a *lot* of money. A third of that is even nice. @montogeek It is (currently), and what kind of conversion do you want to see for Invision -> XState? I've played ar… @montogeek Ask me again on August 30th 📅 @ChrisJPatty This looks great; excited to try it out! @danangan @adylanrff Yes, XState is useable in Node. @JaeTask @athammer_ It does not, it uses its own interpreter. @athammer_ It is! @natessilva Hey I really appreciate this, thank you! I think you'll be excited for the new visualizer and tools com… @_rpgbx I'd say the first one, because that was the one that introduced me to Kapustin (and it's pretty epic) @_rpgbx Sounds great! I've been wanting to learn this one (and the other etudes) eventually. @swyx @eggheadio @ReactRally @keyframers True, but the Avengers had a pretty kick-ass soundtrack!
@swyx @eggheadio @ReactRally Say no more 🎹 @dagda1 Thanks for the feedback! You can also have shared state across multiple places with XState (the useService(… @heytulsiprasad @AskGatsbyJS Not sure what is causing this on the Gatsby side, but it's a warning that can be ignored. @whichsteveyp Is it the cript @code_tank_dev You can useEffect(...) to send a machine an event whenever some data in a query changes. @mr_mig_by @mpocock1 I'd agree with that. Entities and rules can *communicate* with machines; not everything needs… @mr_mig_by @mpocock1 What are some examples of business logic you have used? Things like validation, invariants, etc.? @owickstrom Love how concise the syntax is! @Hal_Wayland I'll definitely be creating more examples that show simple to complex use-cases. @code_tank_dev Have you seen the guide on invoking services? Everything is event-based, wh… if you decided not to use XState for a specific reason, I'd love to know why, too! Keep in mind: you don't nee… you're using XState, we'd love to hear about your experiences learning and using it here:… @dabit3 Even the business logic can be done similarly to infrastructure-as-code 😉 @code_tank_dev The visualizer is about to become much, much better by the way. Keep a lookout for it in a few weeks! @steveruizok Check out Selecto by @daybrush: @dilrajio @mpocock1 Yep! It's all because of the steadfast goal to remain consistent/compatible with SCXML, which h… @mpocock1 Blame SCXML 😅 @mpocock1 Want to post this as a discussion? Would be really curious to hear everyone's thoughts! @lmatteis @Grady_Booch Student loans do, though 💸
@theKashey @erikras It is, actually! Chess is another "perfect information" game. The number of possible board posi… @steveruizok @kyleshevlin @eggheadio You may not like it, but this is what peak arrow perfection looks like @kyleshevlin @steveruizok @eggheadio But be careful about going the other way around... (generating states from all… @kyleshevlin @steveruizok @eggheadio Bonus of doing it with a state machine: you can generate all the possible game… @dilrajio Transitions must always be caused by events (which, sure, your function can send an event). So if you sen… @ryan_c_harris @ecwyne @DigitalizedDan @excalidraw Keep on the lookout for new XState viz/editor tools soon! @mpocock1 This would make a good discussion topic: @BenLesh Actually it's an anagram for "odd bacon sex" @AndaristRake @fakenickels *sigh*
@steveruizok Looking so good! Love how clear it makes the transitions.Let's make a resizable logo! 💡 Inspiration 📺 Watch at ⏰ Live stream Monday, 8/3 @ 17:00 EST
Retweeted by David K. 🎹 @deaniusdev Not exactly. Internal transitions are still transitions. The "state" is different, e.g., state1.event i… @deaniusdev It will, but state.changed will be false.The next #ReactFinland mini-conference is about state management. Details: * 27th of August (16:45-20:40) * Featur…
Retweeted by David K. 🎹 @TheCodingArt Reality sucks, it's where PRs take too long. Let's fix it.
@madnan_rafiq @swyx Give me 28 days @swyx Unlabeled arrows give me heartburn 😟 Also, sequence diagrams are extremely useful to supplement architectural diagrams. @joshduck Do you submit PRs without code? @JFThatsABug @ericclemmons I've experimented with a DSL a while ago, and has explored that…
@ChrisHBrown55 @ericclemmons Yep, that's coming. @MattiaManzati This looks really awesome, though! Does it handle hierarchical states? @JFThatsABug @ericclemmons Yes, but better. You should be able to manipulate the diagram *and* the code; it shouldn… sure we’re going to see a measurable improvement to software when developers can visually create state machi…
Retweeted by David K. 🎹 @okonetchnikov @sharifsbeat I know, so was I 😅 @ericclemmons 29 days 🔜 @sharifsbeat Discussing architecture & modeling instead of coding style would lead to higher productivity and great… @Swizec Whiteboards are the best for scribbling some state machines 😉Addendum: if it's not "readable" or "maintainable", it means that the first 2 points aren't clear in the PR, so yes…
@Swizec Yes - you can `machine.withContext(...)` or, easier, you can send the data as an event. Everything is via events. @niyazpk To make sure the above passes @Swizec Here's a quick example: states: { unknown: { always: [ { target: "morn…