Тёмный
No video :(

XState: Let's pair program state machines and state charts with David Khourshid 

Fun Fun Function
Подписаться 263 тыс.
Просмотров 23 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 44   
@sayanmallick2644
@sayanmallick2644 4 года назад
I was looking for a good XState tutorial to learn from, for days. Finally, I found the perfect one. And clicked as the notification popped.
@alvechy
@alvechy 4 года назад
what's stopping you from going to docs? they're pretty good one
@darrinmc
@darrinmc 3 года назад
This tutorial really worked for me. The questions mpj asked were the some of same ones I would have so it really enforced the whys of the concepts. Great work!
@bone_broth_000
@bone_broth_000 4 года назад
The comment that you read from the chat mid-video about capturing mousedown on the wrong element was actually correct. David was right that you want to capture mouseup on the body (not on the box) but you definitely need mousedown to be on the box or else you have no way to tell which element to drag.
@JamesTharpe
@JamesTharpe 3 года назад
This was useful - thanks for the great intro. I'm starting my first big project using XState in January and I'm excited to use it!
@JesusEnriqueFrancoMartinez
@JesusEnriqueFrancoMartinez 2 года назад
Please share how it went. State Machines have helped me at front and backend but they have been coded in some other thing (context at React, Workflow Symfony at back). But only recently I'm gonna use XState with Angular.
@kettenbach
@kettenbach 4 года назад
The 🎹 man. Great! Been waiting for this. Thank you for sharing. 😀👍
@JesusEnriqueFrancoMartinez
@JesusEnriqueFrancoMartinez 2 года назад
I've coded a complete state machine in context+reducer in React (no redux to avoid another learning curve)… and boy it helped a lot to get rid lots of bugs and defensive coding and not knowing what was going on in the app. and yes the core is a humongous switch and typed events and state@context.
@petrpacas
@petrpacas 4 года назад
Thank you guys, I'm starting to get really curious about XState!
@lyleclassen4698
@lyleclassen4698 4 года назад
I WANT MORE!!!! PLEASE!! thanks for the video. Any suggestions for a Xstate react tutorials ?
@hansschenker
@hansschenker 4 года назад
see: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-kgdjsON25KQ.html
@MePeterNicholls
@MePeterNicholls Год назад
I’ve got a little generic state machine you can programme with a tiny DSL I designed. It’s nothing fancy. Yet 😛
@pZq_
@pZq_ 4 года назад
now new, fresh and good content!
@MaxPicAxe
@MaxPicAxe 4 года назад
The state machine is pure/immutable, the state service is impure/mutable. I think that's the simplest explanation.
@vorname1485
@vorname1485 4 года назад
18:00 would be coupling of state to ui directly if it would ;P
@douglasgodinho9757
@douglasgodinho9757 4 года назад
2:00 Banana time
@taoql
@taoql 4 года назад
* Serios look * * Chews on banana *
4 года назад
GoF State Pattern =)
@NOCTUMSEMPRA
@NOCTUMSEMPRA 4 года назад
Hey MPJ, I wonder why are you NOT using a ligaturized font, which (in my humble oppinion) would rock it even more. I'm kind of obsessed with how good ligatures in code look to me. I could recommend you some cool font families for that matter: Fira Code Retina (comes bundled in Jetbrains' IDEs), Iosevka font family, PragmataPro, and there are some more and some monospaced font which were ported to have ligatures in them, just like Fira Code Retina (in fact, many converted fonts have been added Fira's ligatures). So: Your Quokka evaluating all over the place + ligaturized font = Epic win. Hugs!
@ehsankhorasani_
@ehsankhorasani_ 3 года назад
would it better to use invoke instead of interperate
@sangomalsa
@sangomalsa 3 года назад
It's insane how smart David Khourshid is. He's like 10 steps ahead in solving the bugs. No shade to you, but David is so brilliant
@voyageruk2002
@voyageruk2002 3 года назад
He also wrote the library, and he has used the library for this very problem of drag and drop. It's unlikely he found it this easy at first.
@piotreek7
@piotreek7 4 года назад
Great video but switching between light browser and dark ide is not very comfortable for the eyes ;) I’d be glad if you guys use light ide or dark background for the webpage
@wobsoriano
@wobsoriano 3 года назад
Still wondering when would someone use state machines over redux/context api/zustand/jotai etc in react and pinia/vuex/composition api in vue?
@JesusEnriqueFrancoMartinez
@JesusEnriqueFrancoMartinez 2 года назад
You can totally do the same with a single key in your context, I've called mine stage to not confusing our team with same name for two logic places (i.e. don't use "state inside state"). And the evaluation of an action triggers a transition to another stage or just updates another parts of the context is in the big damn switch. We actually splitter context in two reducers that could be refactored to two machines with XState.
@hansschenker
@hansschenker 4 года назад
Since David is also an Expert in RxJs - How about combining Xstate with RxJs? Did you consider RxJs when you create Xstate? Xstate will become part of the toolset like Typescript and RxJs! Visualizing Xstate is brilliant!
@melvingeorge10
@melvingeorge10 3 года назад
So to go state machines, we need more data about the states.
@denisobydennykh
@denisobydennykh 3 года назад
Hi guys Thank you for the video! The only question is how did you get to render body dataset values by doing > body.dataset.status = state.toStrings().join(); I'm pretty sure that this line does not render them directly on the page. But how did you do it?! Thank you!
@kmz8160
@kmz8160 2 года назад
53:08. It is set in css: body::before { content: attr(data-state); }
@ManontheBroadcast
@ManontheBroadcast 4 года назад
Correct me if i am wrong but this looks like a perfect use case for Pointer Events, ...they allow you to "lock" the mouse to the element in interest and control it even if your cursor is outside of the window ... developer.mozilla.org/en-US/docs/Web/API/Pointer_events BTW ... excellent tutorial...
@vidro3
@vidro3 4 года назад
Why not use the html drag and drop api?
@spacedoohicky
@spacedoohicky 3 года назад
Maybe because that complete api is not yet supported by all browsers. So it's an example of something that would work anywhere. There are also limitations to that api. Using mouse movements for dragging is more arbitrary. You could also use this sort of dragging, and dropping on shapes in an HTML canvas where DOM rules don't apply.
@_7__716
@_7__716 3 года назад
@@spacedoohicky thanks. i had no recollection of making this comment
@spacedoohicky
@spacedoohicky 3 года назад
@@_7__716 You're welcome. I also forget most of my comments. :)
@roytheey
@roytheey 4 года назад
Good video, anyone knows what wireless earpiece he uses? :)
@funfunfunction
@funfunfunction 4 года назад
It's just a PowerBeats Wireless Pro. I don't particularly recommend them for this use case, it's just what I happen to have.
@carlosbenavides670
@carlosbenavides670 3 года назад
Missing #fff
@gokukakarot6323
@gokukakarot6323 4 года назад
Noiceee.
@samelie9659
@samelie9659 4 года назад
not what i would use xstate for. it rly shines as a state machine.... use rxjs for this kinda example
@dmitriyrusanovskyi5548
@dmitriyrusanovskyi5548 4 года назад
sooo, i have to spent an hour to learn another "very usefull" addition that will make my life "easier"? NO, thanks
@dupersuper1000
@dupersuper1000 4 года назад
Dmitriy Barracuda lol, when you were in school, did you leave the classroom 10 minutes into each class period?
@spacedoohicky
@spacedoohicky 3 года назад
It would probably be better if you learned the theory of state machines. The theory is more universal, and applicable everywhere. It doesn't necessarily make things easier. It's more like it makes some things possible that are not possible with garden variety programming. It makes making artificial intelligence easier for example. It's nice to think of FSM as you making "if" statements behave how you want them instead of how the programming language dictates. Inside the FSM is a way to determine what state you'll be in which is functionally like using an "if" statement to make a decision. But in an abstract sense the state of an "if", and the state of an FSM are different. The state of an "if" statement is in the brackets after the "if" statement. In an FSM the state is in a duration of time some time during program execution. Instead of state lasting through brackets after "if" you may, while using an FSM, have a state that could theoretically last for days. Or, to put it another way, with an FSM if you want a state to be active for whatever duration you are in control of that. So it's not necessarily about ease, but more about what FSMs allow that normal programming doesn't allow. But you should google it to find out specifics.
Далее
How to ACTUALLY SHIP side projects?
23:19
Просмотров 11 тыс.
Cute kitty gadgets 💛
00:24
Просмотров 14 млн
WILL IT BURST?
00:31
Просмотров 25 млн
David Khourshid - Everything is an Actor
44:50
Просмотров 10 тыс.
Coding reduce from scratch in vanilla JavaScript
25:23
XState Docs Speedrun - 2022
1:08:48
Просмотров 26 тыс.
C++Now 2019: Kris Jusiak “Rise of the State Machines”
1:35:11
Kubernetes 101 workshop - complete hands-on
3:56:03
Просмотров 1,6 млн
Cute kitty gadgets 💛
00:24
Просмотров 14 млн