Better HN
topnewbestaskshowjobs
Log inSign up

daneburkland

17 karma · joined Aug 21, 2015 (11y ago) · 8 submissions

https://www.afforded.space/
Submissions

comment 6y ago · link · parent

Agreed! Always trade offs. Will give that a read. Thanks again.

comment 6y ago · link · parent

Whether the user has switched from "Home" -> "Latest Tweets", whether the app has encountered an error since the request was made, whether the user has interacted with a previously loaded tweet, whether the user has quickly scrolled and another request is pending.

Thanks for the feedback. The benefits of modeling application logic with state machines are increasingly apparent as complexity grows. But that complexity makes for a dense blog post :)

comment 6y ago · link · parent

`whateverYouNeedToDo` needs to have knowledge of the application's state. Spreading application logic around event handlers is problematic. In sufficiently complex applications, we're better off simply 'passing messages' (https://en.wikipedia.org/wiki/Message_passing). Perhaps I'll start on a follow-up post which better outlines those benefits :)

comment 6y ago · link · parent

What do you do inside of the then and error blocks? _That_ is what this post (and state machines) are concerned with. Passing messages to a single entity (reducer in this case) that decides how to handle them, rather than spreading that logic across components, event handlers etc.

In terms of boilerplate, libraries like Xstate do a great job on that front. The goal here is to provide a from-the-ground-up overview of using explicit state machines.

5.

Explicit State Machines in React(afforded.space ↗)

3 points · by daneburkland · 6y ago · 8 comments

comment 6y ago · link · parent

Totally. Interesting parallel I hadn't considered. Set-it-and-forget-it SaaS is a sweet place to be :)

comment 6y ago · link · parent

Agree, culture is perhaps the elephant in this room.

8.

“Seems like the type of job where you’re only noticed when you make a mistake”(afforded.space ↗)

32 points · by daneburkland · 6y ago · 4 comments