← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 139
  1. Careful with Context Composition

    import Example1 from '.

  2. Comparing `useRef` and `useState`

    import BackgroundCounter from '.

  3. What is a Closure?

    In JavaScript, and some other languages, too, there is the concept of a "closure".

  4. Prefer Function Updaters in State Setters

    import ItemSelectorBad from '.

  5. Dependency Injection and Default Parameters

    I've been working on lessons for a new course recently, and one of the the lessons I created inspired me to share one of my favorite techniques for creating flexible functions: dependency injection and default parameters.

  6. I'm writing this post because I've forgotten the following material enough times to warrant leaving myself a permanent resource for future reference.

  7. Prefer Declarative State Updaters

    Since the advent of React hooks, I have seen a pattern emerge that I think is less than ideal.

  8. How I Structure My React Projects

    import SocialPost from '../../..

  9. What are “Magic Values”?

    I recently did a code review for an aspiring developer and instructed them to "get rid of the 'magic values' in their code."

  10. `useMemo` and Stable Values

    The most common pattern I use when writing custom React hooks is to return a tuple of [state, handlers]. state is the value held by the hook, and handlers is an object with methods that update the state.

  11. Symbolic Logic

    In college, I double majored in Philosophy and Mathematics.

  12. Set Theory

    I find Sets and set theory to be a fascinating concept, both in the abstract <Marker content="As a mathematical and philosophical concept." /> and in the concrete <Marker content="I enjoy using them in JavaScript" />, and one that I find more and more use…

  13. What is a Tuple?

    As a JavaScript developer, we don't have an official Tuple data type like we do Array or Object, but that doesn't mean we don't have tuples in our code.

  14. Conditional React Hooks

    You want to conditionally call a hook, but you can't do that because of rules.

  15. Debounce and Throttle Callbacks with React Hooks

    This one will be short and to the point.

  16. How to Use React Context Effectively

    React Context has always been a somewhat controversial tool.

  17. Facade Pattern

    We live in exciting times (for JavaScript developers).

  18. useEncapsulation

    import SocialPost from '../../..

  19. Encapsulation

    This post will be short and sweet, yet it is my sincere hope that after reading this blog post, you will think about functions a little differently than you did before.

  20. Use Old School State

    import FirstCounter from '.

  21. Helpful Debugging Hooks

    import ChangeExample from '.

  22. Headlight Vision

    I've been struggling a lot lately with my inner self-talk.

  23. Pattern Matching in JavaScript

    Today, I want to share with you a coding pattern I frequently use when writing conditional JavaScript.

  24. Generator Functions

    import Collatz from '.

  25. Multiple Boolean Props are a Code Smell

    import CommonButton from '.

  26. Mental Model of Use Effect

    One thing I have found challenging about React.useEffect is the mental model regarding the dependencies array.

  27. Tic-Tac-Toe in React

    import BlankGrid from '.

  28. Using `React.memo` to Avoid Unnecessary Rerenders

    import { Profile, MemoizedProfile, Parent, ObjectParent, RefParent, OtherObjectParent, } from '.

  29. Memoization: What, Why, and How

    import Adder from '.

  30. The Three Kinds of React State

    import LocalCounter from '.

  31. import LightBulbWithFuse from '.

  32. Break Out Your Component Logic with Hooks

    import TogglingItem from '.

  33. import HueLightBulb from '.

  34. Can a State Machine be a String?

    import LightBulb from '.

  35. How to Use `useReducer` as a Finite State Machine

    import LightBulb from '.

  36. Guidelines for State Machines and XState

    Table of Contents Intro What is a State Machine?

  37. Managing Cyclomatic Complexity

    I'm not sure when I first learned about "cyclomatic complexity".

  38. Recursive React Components

    import BetterStyledTree from '.

  39. Enumerate, Don't Booleanate

    I want to teach you something that's taken me a few years to learn and a lot of trial and error.

  40. The Future of Second Career Devs

    At the time of this post, it has been roughly seven and a half months since I released an episode of Second Career Devs.

  41. How to Render an Object in React

    import Log from '.

  42. How to Add Algolia Search to a Gatsby Site

    Update: In the time since writing this post, I have removed the search feature for my blog.

  43. Graphs Are Everywhere

    import DirectedGraph from '.

  44. When `else`s Make Your Code Worse

    import SocialPost from '../../..

  45. A Plea for Imagination

    Some of you reading this know that I occasionally dust off the old microphone, fire up a text editor and make some educational material that I put on the interwebs.

  46. Just Enough FP: Composition

    Composition is the culmination of all the previous "Just Enough FP" blog posts.

  47. Just Enough FP: Pointfree

    Pointfree programming is a style of programming free of points.

  48. Just Enough FP: Argument Order

    In a previous post on currying, I used a filter function in a way that may have left you scratching your head.

  49. Just Enough FP: Partial Application

    I mentioned partial application several times in my previous post on currying with the promise of going in more detail about it in the future.

  50. Just Enough FP: Currying

    Currying is, by far, one of the coolest things I've learned in the last few years.