Skip to content

Instantly share code, notes, and snippets.

View bholmesdev's full-sized avatar

Ben Holmes bholmesdev

View GitHub Profile
@bholmesdev
bholmesdev / react-async-await-rfc-notes.md
Created October 15, 2022 18:22
React async / await RFC notes

React async-await RFC

What I know coming in

React server components (initial proposal) was a so-so DX that solved an important problem: I want to render a React component on the server only, with APIs to easily fetch data for rendering.

  • Pulls on islands architecture concepts (hi Astro.build!)
  • Improves full-stack ergonomics

Content management is broken. Let's fix it

By Ben "MDX" Holmes

What am I talking about?

Background: I worked on an ecommerce site with a medium-sized enterprise team. This team needed a lot of cross-communication copy writers, designers, product managers, and developers.

Purpose: To thoroughly understand the content management problem space, and analyze existing solutions.

⚠️ I am not discussing our own solution! Just setting the groundwork from my perspective, so Astro can build from there 😄

@bholmesdev
bholmesdev / 1-layout-styles.astro
Last active August 13, 2022 17:56
Prismic x Astro newsletter challenge
<style is:global>
:root {
--font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
--font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem);
--font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
--color-text: #F4E7FF;
--color-text-secondary: #C3B6FE;
--grey-1: #0F172A;
--grey-2: #1D293B;
--grey-3: #344155;
@bholmesdev
bholmesdev / machine.js
Created October 29, 2020 00:18
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bholmesdev
bholmesdev / machine.js
Created October 28, 2020 22:10
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bholmesdev
bholmesdev / machine.js
Last active October 26, 2020 17:14
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bholmesdev
bholmesdev / machine.js
Last active August 21, 2020 17:09
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bholmesdev
bholmesdev / machine.js
Last active August 17, 2020 15:34
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bholmesdev
bholmesdev / machine.js
Last active July 31, 2020 15:00
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bholmesdev
bholmesdev / machine.js
Last active July 24, 2020 17:29
Generated by XState Viz: https://xstate.js.org/viz
// export type loadingStates = 'loadingCart' | 'loadValidateShipping'
const loadingSideEffects = {
loadingCart: {
invoke: {
src: 'loadingCart',
onDone: [{
target: 'idleCart',
cond: (_, event) => event.data,
actions: [