Posts

Tutorials and notes on React, TypeScript, authentication and the tools around them.

13 posts ยท dates show when a post was last updated

2026

  1. AuthenticationOAuth - What is the purpose of PKCE?How does it work?
  2. Gitgit worktree in my own wordsWhy are worktrees so awesome?
  3. React 19Implementing the loading spinner in ReactDifferent ways to use React's <Suspense> to provide a pleasant UX as a page loads
  4. React 19Updating the state reducer pattern to use TypeScriptWe don't need the actionTypes variable anymore.
  5. React 19Using React context to implicitly share state in compound componentsFun fact: This was previously accomplished with React.cloneElement
  6. React 19Get the latest props in an async click handler by using the "latest ref" patternClosure in JavaScript makes this a challenge otherwise.

2020

  1. React 16Control a child component's inner stateThis works if you are using the state reducer pattern.
  2. React 16Use prop collections to pass on aria attributesPackage up the props which always need to be passed to a component in a hook.
  3. React 16The React version of HTML's <select> componentThe compound component pattern has a root component implicitly sharing state with a set of possible children.
  4. React 16Export helpers from a "context module"Rather than passing helpers down in the context value, exporting them separately could have readability and performance advantages.
  5. React 16Conditionally rendering JSXSome conditional rendering tools to add to your toolbox.
  6. React 16Why you can't add a third party script in the render functionTurns out scripts added with innerHTML are inert.
  7. React 16Use a prop, not another piece of stateThe argument passed to useState is only used once.