Skip to content

WIP: Design Motivations

Pratik edited this page Mar 13, 2018 · 1 revision

Hi, I'm a fellow front-end React developer.

I also...

  • am lazy (aka. frugal about where I spend my time)
  • want my app to behave predictably and reliably
  • want my app to be easy to reason about - both for new members on my project and for future-me a few months down the line
  • want debugging to be a cinch
  • learn by tinkering, and want my app to be as tinker-able as possible
  • enjoy making up words like tinker-able

Are you like me? Then machinate may be for you!


Here are a few design principles that the tool aims to follow:

  • State is often discrete and scoped, (e.g X can be either in state Y or Z). Often the possibility of one state is dependent on something else (for X to have some state, A must be in state B).

  • The developer should be able to jump to any state at any time, as long as state dependencies are fulfilled. That is the only constraint.

  • The app is a function of the internal state, plus external triggers.


  • Most UI state is tightly scoped and discrete. Sometimes the state of one thing in your app is dependent on the state of something else, and sometimes there's no relationship between things at all. For example an app may have the following states:
    • Authentication: User is logged in, User is logged out, The app hasn't read the cookies yet to figure out whether the user is logged in or out
    • Navigation Display: The user is on the Dashboard page. The user is on the About page. The user is on the Settings page.
    • A user's post: The post is in view-mode. The post is in edit-mode where the user can update the text and save it.
    • A linechart on the page: Is showing the last 6m of data. Is showing the last 3m of data. Is showing the last 1m of data.
Clone this wiki locally