
Andrew Prifer
@AndrewPrifer
Followers
3K
Following
4K
Media
156
Statuses
1K
UI, UX, 3D. Cooking something new. Prev: @LumaLabsAI @theatre_js @splinetool
🌎
Joined November 2015
#DreamMachine's carousels are probably the most complex UI I've ever built. We wanted a free-flowing, diagonally arranged, arbitrarily long carousel that would satisfyingly flow around other UI elements. Something that doesn't exist anywhere else. Read on for some behind the
11
6
93
How I’m prompting Claude from now on
We built Claude Code into a browser & whiteboard! It's called Decode @decodetool It’s the fastest & best way to give UX feedback to Claude Code while coding locally & enables it to review & test changes itself See thread👇to learn how whiteboards makes it an even better browser
0
0
1
I am curious how Remix 3's primitives would wrap complex functionality like this into a single call site without a hook-like primitive.
Unfun fact: even without forcing a delay, naive handling of asynchronous code can cause race conditions, as results may not return in call order. I once challenged myself to write the minimal solution that correctly handles race conditions, caching, and state management, and it
1
0
1
I also think it provides a pretty cool API in its own right, which I still haven't found a comparable equivalent for. :) Check it out.
github.com
📯 Tiny, flexible and ergonomic data fetching & RPC library for React with memoization support - AndrewPrifer/tiny-async
1
0
7
Unfun fact: even without forcing a delay, naive handling of asynchronous code can cause race conditions, as results may not return in call order. I once challenged myself to write the minimal solution that correctly handles race conditions, caching, and state management, and it
AbortSignal is a cool API, but it's also quite dangerous in practice See, for example, how Ryan wasn't 100% sure that the line was needed, despite web platform expertise Now, imagine adding a seamless "await delay(1000)" anywhere below => it reintroduces the race condition
1
1
9
This is still one of the most audacious things I’ve ever put in a real-world app, but somehow what I’m building now feels a 1000x cooler. The future is bright.
The loading animation is using animation blending, a technique borrowed from video games that ensures that different animation cycles flow nicely into each other.
0
1
30
Who doesn’t use a VESA mount anyways? Like yeah sure the studio display stand is pretty but it will never provide the same range as my $50 monitor arm from amazon.
0
0
2
The hard thing about microVM-based services like @flydotio is that you need to know Docker. The easy thing about microVM-based services is that you only need to know Docker.
We now have first-class support for standalone backend deployments in @vercel. What's the simplest approach for the following scenario? - I have a monorepo with shared code across targets, including my backend, via packages. - These targets use bundler module resolution, and
1
0
2
Once you have a database, there is no scenario in which you wouldn't want to have it in the same colo. One way or another, you're making a trip to it! There's nuance with replicas, caching and connection pooling, but even then, 99% of the time a colo will beat a local worker.
1
0
1
Cloudflare's opt-in solution to this is Smart Placement, which feels very contrived to me. What it does is it looks at past worker performance and picks the location with the best performance so far, as long as it's still worth it with the longer roundtrip time. This means that
2
0
1
I'm very happy that Cloudflare is now positioned as a direct Vercel competitor. However, I found "region: earth" isn't ideal for most apps. I learned this the hard way (just moved my backend off of workers)--you can cut up to 300ms off PER QUERY just by colocating servers with
1
0
1
Now to bash on react a little bit too, one of the biggest newb footguns is that people are prone to reacting to events in effects instead of the event itself. That is bad. Although I feel like this is not necessarily a React problem, it is a “we don’t have a good enough
@rickhanlonii @AndrewPrifer hey I already made a drummer! I just changed the drummer's tempo in the event handler, which deals with its own interval, so it's not modeled as a reactive thing, just a task in an event if you want to make something that shows off a reactive setInterval, I'll clone it
1
1
11
See the sneaky code duplication? Every solution has tradeoffs as soon as you increase complexity. In React, your teardown logic has one place to live. In Remix 3 you have to manually run it when your props change, AND when the component unmounts (the abort signal branch).
4
1
68
genus proximum, differentia specifica
0
0
1
React's complexity can obscure its appeal, but reactivity is powerful: the UI is a function of state, always. This simplifies reasoning, unlike having to manage both state, and update timing. Reactivity is annoying in that it makes determining UI state the main challenge, thus
Why were opt-in renders chosen in Remix 3 when @solid_js, Vue Vapor, Inferno, Ripple etc. have already shown you can get near-vanilla performance without? Is there some cool architectural benefit you get from it specifically in Remix 3?
0
0
2