Guidelines for State Machines and XState
A guide to using state machines and the XState library for managing application state, covering concepts, implementation, and best practices.
Kyle Shevlin is a software engineer based in Portland, Oregon, who cares deeply about quality in code, writing, and craftsmanship. He focuses on continually improving his skills and helping other developers do the same, while balancing his professional life with competitive golf, gaming, and community-driven learning.
128 articles from this blog
A guide to using state machines and the XState library for managing application state, covering concepts, implementation, and best practices.
A developer explains cyclomatic complexity, its importance for maintainable code, and demonstrates it with examples from simple functions to the Gilded Rose kata.
Explains how to create recursive React components using the factorial function as an analogy, with examples for rendering nested data like file trees.
A software developer explains why using enumerated states is better than multiple boolean flags for managing UI state in React applications.
A tutorial on creating a React component to display objects using JSON.stringify for debugging purposes.
A tutorial on integrating Algolia's powerful search functionality into a Gatsby static site using the gatsby-plugin-algolia.
A developer argues that `else` statements often make code more complex and demonstrates how refactoring with early returns and guard clauses can simplify JavaScript logic.
A software educator argues that developers must cultivate imagination to remix and apply contrived educational examples to real-world software problems.
Explains functional composition in programming, building on concepts like currying and higher-order functions with practical JavaScript examples.
Explains pointfree programming in functional JavaScript, using Array.map to demonstrate eliminating lambda variables for cleaner, reusable code.
Explains why data should be the last argument in curried functions for better reusability and composition in functional programming.
Explains partial application in functional programming using JavaScript examples, focusing on closures and practical use cases.
An introduction to currying in functional programming, explaining how to refactor functions to accept arguments one at a time, using JavaScript examples.
An introduction to the concept of immutability in functional programming, explaining its benefits and demonstrating it with JavaScript examples.
Explains the concept of pure functions in functional programming, defining them by deterministic outputs and the absence of side effects.
Explains higher-order functions in functional programming, covering their definition, uses for abstraction, and adding functionality.
Announcing a concise 30-minute course on functional programming in JavaScript, covering core concepts like pure functions and composition.
A developer shares a technical solution for integrating Firebase with Gatsby, focusing on fixing a 'window' object error during the build process.
A guide to using the XState Visualizer tool to create, visualize, and interact with state machine graphs for software development.
A tutorial on creating a state machine using the XState library, demonstrated with an elevator example.