Dan Train's Avatar

Dan Train

@dantrain.com.bsky.social

19 Followers  |  35 Following  |  22 Posts  |  Joined: 19.10.2024  |  2.4776

Latest posts by dantrain.com on Bluesky

Post image

Hi Jen, when my web app is added to home screen the top bar now remains white in dark mode. I used to control this with `theme-color` which still worked until 26.1.

08.11.2025 13:57 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I learned that pnpm has a built-in patch command, if it helps. I use Fly.io to run containers, can recommend.

28.10.2025 08:51 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

This is incredible

04.08.2025 07:18 β€” πŸ‘ 9156    πŸ” 2679    πŸ’¬ 240    πŸ“Œ 485

I feel like today if you want to take the RSC approach you have Next.js, but if you like the GraphQL Fragments approach it's not so easy. I made myself a remix-relay package and @phry.dev ‬is making Apollo integrations but I'm surprised it's not more commonplace since it indeed "cracks the nut"

30.05.2025 16:51 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Another great article Dan!

30.05.2025 16:51 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

If you can’t handle me at my Dance Yourself Clean 0:00-3:05 you don’t deserve me at my Dance Yourself Clean 3:06-8:56

09.05.2025 16:35 β€” πŸ‘ 1204    πŸ” 220    πŸ’¬ 4    πŸ“Œ 5
Post image

Excellent work by new NYT headline writer Werner Herzog

28.03.2025 18:28 β€” πŸ‘ 17093    πŸ” 2627    πŸ’¬ 144    πŸ“Œ 113

I lived in London during Brexit. And I always told Americans back home that, as bad as Trump 1.0 was, it wasn't nearly as existential as Brexit. Which felt like a near-permanent shift in how the country functioned. I used to say it was like watching a country commit suicide. Trump 2.0 is like that.

21.03.2025 13:18 β€” πŸ‘ 223    πŸ” 25    πŸ’¬ 2    πŸ“Œ 1
Preview
GitHub - dantrain/remix-relay: Integration between the React Router v7 framework and the Relay GraphQL client Integration between the React Router v7 framework and the Relay GraphQL client - dantrain/remix-relay

Dan I copied your Movie App for my React Router + Relay integration library example. That JSConf Iceland talk was so exciting and led to all this modern framework world! github.com/dantrain/rem...

15.02.2025 11:22 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Check out this 4 bedroom link detached house for sale on Rightmove 4 bedroom link detached house for sale in Stryd Y Castell, Conwy, LL32 for Β£875,000. Marketed by Dafydd Hardy, Llandudno

lmao the bathtub

www.rightmove.co.uk/properties/1...

05.01.2025 12:55 β€” πŸ‘ 1221    πŸ” 255    πŸ’¬ 182    πŸ“Œ 250

The docs say "If used alongside Partial Prerendering, segments that have 'use cache' will be prerendered as part of the static HTML shell" but if the default revalidation period is 15 minutes, what's the point of prerendering? I'd prefer a separate 'use static' directive.

04.01.2025 16:02 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Awesome, thank you!!

19.12.2024 19:54 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Amazing, thank you!!

19.12.2024 19:53 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Hey @tannerlinsley.com just saw the discussion of RR vs TSR loaders. I really like the TanStack Start approach but I still have this question, could a Server Function return a stream of chunks?

19.12.2024 19:35 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Awesome news!

Took me a minute to find how to type a ref prop when removing forwardRef. First I tried RefObject<> but it didn't work with a callback, then I found the Ref<> type. Maybe worth adding to the guide?

08.12.2024 16:20 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Link? Also how did someone else get kittydothedishes.tumblr.com isn't that cybersquatting lol?

07.12.2024 10:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
@graphql-tools/executor (GraphQL-Tools) GraphQL-Tools Documentation

So I have code that should only run on the server that potentially returns both an initial response and a ReadableStream of subsequent chunks. I need to get both back to the loader somehow. It's this thing the-guild.dev/graphql/tool...

02.12.2024 16:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I believe that loaders in TanStack Router run on both server and client, whereas Remix/ReactRouter has separate server and client loaders

02.12.2024 10:03 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

This is where I'm stuck, can I return a ReadableStream from a TanStack Start Server Function? I don't think I can execute the request directly in the loader since it's isomorphic

02.12.2024 09:35 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Ah amazing, this would be far better! I'll keep on eye on the progress, thanks!

02.12.2024 09:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

For some reason Discord is demanding I verify my phone number but the SMS message with the code isn't coming through, maddening!

01.12.2024 22:17 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
GitHub - dantrain/remix-relay Contribute to dantrain/remix-relay development by creating an account on GitHub.

Brilliant I will check it out thank you! Here's my attempt with Relay and Remix if you're interested (just in middle of the React Router v7 migration today) github.com/dantrain/rem...

01.12.2024 21:57 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

I'm trying to put Relay together with Tanstack Start including @defer, but I have a problem. Executing the request is server code so I need a Server Function, but I can't use the `defer` function there afaik @tannerlinsley.com any ideas?

01.12.2024 21:45 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
// Code block with the following code:

export const Route = createFileRoute("/")({
  component: Home,
  loader: async () => ({ countPromise: defer(getCount()) }),
});

function Home() {
  const { countPromise } = Route.useLoaderData();

  return (
    <p>
      Count:{" "}
      <Await promise={countPromise} fallback={"(Loading...)"}>
        {(count) => <span>{count}</span>}
      </Await>
    </p>
  );
}

// Code block with the following code: export const Route = createFileRoute("/")({ component: Home, loader: async () => ({ countPromise: defer(getCount()) }), }); function Home() { const { countPromise } = Route.useLoaderData(); return ( <p> Count:{" "} <Await promise={countPromise} fallback={"(Loading...)"}> {(count) => <span>{count}</span>} </Await> </p> ); }

Ok I've realised it's done like this today, which works great. But is the React 19 `use()` API the future?

15.11.2024 17:48 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
// Code block with the following code:

export const Route = createFileRoute("/")({
  component: Home,
  loader: async () => ({ countPromise: getCount() }),
});

function Home() {
  const { countPromise } = Route.useLoaderData();

  return (
    <p>
      Count:{" "}
      <Suspense fallback={"(Loading...)"}>
        <Count countPromise={countPromise} />
      </Suspense>
    </p>
  );
}

function Count({ countPromise }: { countPromise: Promise<number> }) {
  const count = use(countPromise);
  return <span>{count}</span>;
}

// Code block with the following code: export const Route = createFileRoute("/")({ component: Home, loader: async () => ({ countPromise: getCount() }), }); function Home() { const { countPromise } = Route.useLoaderData(); return ( <p> Count:{" "} <Suspense fallback={"(Loading...)"}> <Count countPromise={countPromise} /> </Suspense> </p> ); } function Count({ countPromise }: { countPromise: Promise<number> }) { const count = use(countPromise); return <span>{count}</span>; }

@tanstack.com TanStack Start is looking so awesome! Curious about streaming deferred data, could something like this work in future?

15.11.2024 13:52 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
The Onion Buys Alex Jones’s Infowars Out of Bankruptcy The satirical news site planned to turn Infowars into a parody of itself, mocking β€œweird internet personalities” who peddle conspiracy theories and health supplements.

Hi everyone.

The Onion, with the help of the Sandy Hook families, has purchased InfoWars.

We are planning on making it a very funny, very stupid website.

We have retained the services of some Onion and Clickhole Hall of Famers to pull this off.

I can't wait to show you what we have cooked up.

14.11.2024 14:09 β€” πŸ‘ 59121    πŸ” 16073    πŸ’¬ 2351    πŸ“Œ 4644

I keep getting confused by the "static" terminology. To me "static" means rendered at build-time, as in "static site generator". I think maybe I'd like a "use static" directive where fetches are always made from the CI server, and for "use cache" they're always made from the app server (and cached)

25.10.2024 14:00 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

The dream of the 2010s is alive in Bluesky?

21.10.2024 20:02 β€” πŸ‘ 8    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

@dantrain.com is following 20 prominent accounts