David Khourshid - Formal Forms with State Machines | React Next 2019

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 10

  • @CoryTheSimmons
    @CoryTheSimmons 5 років тому

    Really nice David. Thank you for your work.

  • @nnslife
    @nnslife 4 роки тому +3

    I am not sold on XState. How is it better than Redux? Seems just like an extra layer.
    27:25 - is visualisation the only advantage?
    Redux/Elm hold the whole state in a single object and in order to change it, you just create a new object and update some fields.
    In XState the whole state is separated into State-Machine-State and Context(extra properties = everything else).
    Manipulating State-Machine-State is beautiful and XState might be cool in some very basic use-cases, but in the majority of applications you need context and manipulating the context is awkward: as at 25:23, you have to write "actions: assign({ two: (_, e) => e.value })" to update property "two".

    • @n8morse
      @n8morse 4 роки тому +6

      like you said, it is easy to update state in Redux, "you just create a new object and update some fields." The combination of just a few fields makes for a large state space that may include impossible states. xState restricts the allowed states to just well defined ones. Additionally it prescribes the sequence of those possible states. It takes more work to be that specific about what those states and transitions are. So, you would only want to use xState if you can envision your app (or some portion) as paths through a set of states.

  • @mcspud
    @mcspud 5 років тому +8

    4:08 - 4:17 - LOL!

    • @nateadams4770
      @nateadams4770 5 років тому +2

      mcspud you could hear the crickets chirping

  • @tom_fales
    @tom_fales 5 років тому

    no link to the form project in codesandbox :(

  • @satvistayou
    @satvistayou 7 місяців тому

    There is simple name for what is described here - Elm.
    That’s right, use it to escape from complexity hell

  • @ehsankhorasani_
    @ehsankhorasani_ 4 роки тому +1

    your last name is a Persian word (خورشید) which means sun