Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Build uncompromising high-performance, high-fidelity apps with React. What you see is not the Apple Messages app, nor is it meant to be 1:1. Rather it serves as an aspirational and real example of UI/UX that is possible. Every detail from the bubble animations to keyboard gestures to scroll view...

141,222 Aufrufe • vor 1 Monat •via X (Twitter)

40 Kommentare

Profilbild von James Ide
James Idevor 1 Monat

Running on Android. I don’t think this is what people expected when they asked for Android to get blue bubbles :P

Profilbild von Gregory Moskaliuk
Gregory Moskaliukvor 1 Monat

Wow, this looks insane! If you ever need rich formatting inside those custom bubbles without tanking performance, we built react-native-enriched-markdown for this exact use case:

Profilbild von lauren
laurenvor 1 Monat

beautiful

Profilbild von James Ide
James Idevor 1 Monat

Thank you!

Profilbild von Xuan Huang · 黄玄
Xuan Huang · 黄玄vor 1 Monat

@reactjs Beautiful UI Beautiful Writing Beautifully React Beautifully Native

Profilbild von Jamie Birch
Jamie Birchvor 1 Monat

The thing I am actually most astonished by is James’s laser-like accuracy when typing on the virtual keyboard during a recorded demo

Profilbild von Christoph Nakazawa
Christoph Nakazawavor 1 Monat

Is this legal

Profilbild von James Ide
James Idevor 1 Monat

Oh dear

Profilbild von Samuel Scheit
Samuel Scheitvor 1 Monat

Incredible work! Just a little nit-pick :) The send animation which transforms the input box into the message bubble needs a bit of polishing 1. bubble needs to stay visible at all times 2. bubble needs to stay on top of the input box 3. input box needs to slowly shrink in height

Profilbild von parbez
parbezvor 1 Monat

can you link to the repo? I want to steal some optimisations 😂

Profilbild von James Ide
James Idevor 1 Monat

There’s a lot of code, what part do you want to know more about?

Profilbild von James Ide
James Idevor 1 Monat

Animations: sending a chat bubble and revealing the timestamps on the side use Animated with the native driver. Reanimated would work well too. The Delivered/Read statuses and animating the bubbles’ positions use CSS Transitions. But without that API you could use (Re)Animated. Incoming chat messages and the typing indicator (not shown) use CSS Animations. The peek and pop effect is UIKit, including the way chat bubbles are lifted out of the scroll view and animate back to their original position when done. List: powered by VirtualView: There is some additional logic to make the chat bubbles cheap, like React.memo() and initializing the animated values only if a chat bubble is being sent and needs animation. The new scroll view I mentioned is for precise keyboard and safe area/inset handling and is not for speed. There is also some code to get the softly blurred headers on iOS 27. Native components: the chat bubbles are native because of the tails and animations. You could do this with SVG but it is likely faster to use CALayerPaths and there are potentially a lot of chat bubbles. The other native components are related to the keyboard and text composer because they are intrinsically coupled to UIKit’s delegate methods and must be frame-perfect. These pieces are infrastructure and I could see them maturing over time and being usable in most apps, instead of each developer rewriting their own implementation.

Profilbild von parbez
parbezvor 1 Monat

Thanks for the explanation

Profilbild von Spencer Taylor
Spencer Taylorvor 1 Monat

@expo Well said, and completely agree. “React and Native, not React vs. Native” Put that on a billboard.

Profilbild von Charles Vinette
Charles Vinettevor 1 Monat

Great post. An application is only as great as the level of polish and attention you give it.

Profilbild von Internet Labs
Internet Labsvor 1 Monat

Proving you can lock in 120 FPS by blending custom Swift layers with React Native completely buries the old bridge performance myth. Are you planning to package up that custom VirtualView scroll strategy as an open-source library?

Profilbild von James Ide
James Idevor 1 Monat

VirtualView is open source and implements the cell rendering behavior: import {unstable_VirtualView as VirtualView} from 'react-native'; Docs: Stress test it with a few thousand views and work on making your cells as lightweight as you can. You’ll find it prioritizes rendering blanks (I believe this is also SwiftUI’s strategy) when the app can’t keep up. For real-world scrolling, it does a nice job of keeping scroll momentum and balancing how much off-screen content to pre-render.

Profilbild von Selva
Selvavor 1 Monat

Is the data static? Try fetching it from the backend using an infinite query, like you would in a real-world application. Or better yet, store it in expo-sqlite and read from there, with a background sync to keep it up to date. Will you still get 120 FPS?

Profilbild von James Ide
James Idevor 1 Monat

The data is static which acts as a stress test for UI rendering since there is no network or data store to act as a bottleneck. The UI would have an easier time maintaining its frame rate when waiting for data with non-blocking fetches. I do think SQLite can perform very well, especially with the massive speed improvements in Expo Modules 2 and tuning how messages are fetched in batches. Would be good to measure it, I was focused just on the pure UI parts.

Profilbild von Selva
Selvavor 1 Monat

Well said! The UI work is beautiful.

Profilbild von Ahmad
Ahmadvor 1 Monat

does voiceover still read the bubbles in order with the timestamps moving separately??

Profilbild von Pavlo Nekrasov
Pavlo Nekrasovvor 1 Monat

Expo always delivers

Profilbild von Colin Hunt
Colin Huntvor 1 Monat

Serious wow factor

Profilbild von Brian Hadu
Brian Haduvor 1 Monat

aspirational examples are great, but they can set unrealistic expectations for developers

Profilbild von COURT
COURTvor 1 Monat

Can you please make an actual dummy build of this kit so we can play around with it and experience it before we signup? Just a mock iOS app in the AppStore that users can download and see the view in action. I don’t want to commit to anything without know if it will work for my project. It looks really great!

Profilbild von Serhii Y.
Serhii Y.vor 1 Monat

"Uncompromised performance" is less impressive when it's only demonstrated on flagship hardware.

Profilbild von Nitesh ₿⚡️
Nitesh ₿⚡️vor 1 Monat

Wish apple cared about the messages app as much as you did.

Profilbild von Tomas Martykan
Tomas Martykanvor 1 Monat

Very nice, GitHub link?

Profilbild von Azhar
Azharvor 1 Monat

“Cofounder at expo” ah I see

Profilbild von Salem Shamakh 🇵🇸
Salem Shamakh 🇵🇸vor 1 Monat

Why you do not use legend list, also can you share code so we can learn from it

Profilbild von James Ide
James Idevor 1 Monat

I wanted to try VirtualView. Legend List is great too I’m sure. It would be good to ship a lot of the infrastructural code into react-native core and Expo core upstream.

Profilbild von Hari · animata.design
Hari · animata.designvor 1 Monat

Great! Only that's bothering me is that sent message bubble animation

Profilbild von Gregor
Gregorvor 1 Monat

imo 'uncompromising' always loses to the reconciler the moment bubble animations hit real message volume

Profilbild von Stephen Rayner
Stephen Raynervor 1 Monat

GitHub repo?

Profilbild von Forti
Fortivor 1 Monat

Make it open source 🥹

Profilbild von Juan Arreguin
Juan Arreguinvor 1 Monat

Those interaction details are my favorite part of building @PanolsApp too. Especially making the controls feel good while keeping the photos front and center.

Profilbild von Farzad Yousefzadeh
Farzad Yousefzadehvor 1 Monat

@jamonholmgren good example demo for the recent debates you’ve been in? This can help widen the perspective of some blindly obsessed people you talk to 😊

Profilbild von Benji T
Benji Tvor 1 Monat

React lookin' like Apple Messages and it ain't even tryin' to cosplay. This is the bar for mobile UI now.

Profilbild von Kgaugelo Kg
Kgaugelo Kgvor 1 Monat

What are the specific tradeoffs of the new scroll strategy during graceful degradation? Knowing these limitations would help determine when to swap it out for other options.

Profilbild von James Ide
James Idevor 1 Monat

VirtualView skips rendering in favor of keeping scroll momentum. It will display blanks when it predicts the app will not meet its frame deadline, and the scroll view will keep moving with minimal stutter. In contrast, UIKit’s UITableView will freeze the scroll position until it has enough cells to display. This means there is always content on the screen but the scroll view is more likely to stutter when the app can’t keep up. Both approaches are valid and could share optimization strategies. For instance, in either case you could render a very cheap placeholder if you expect to miss your frame deadline. It would make VirtualView look better and UITableView perform better. And for the user, they’re often scrolling so fast in this scenario, it could be a good tradeoff to make.

Ähnliche Videos

AG-UI makes building agentic applications dramatically easier. Here's how it works. This is a model for a simple chatbot: User → LLM → Response But interactive agents that render UI, pause for approvals, and ask users for input need a much more complex model. When building these agents, a response from the LLM will include a series of state changes as the agent runs: • Agent started a task • Agent called a tool • Agent updated its state • Agent streams these tokens • Agent is waiting on a human • Agent is resuming the task The Agent-User Interaction Protocol (AG-UI) treats the LLM response as a stream of events rather than a text endpoint. In practice, here is what you get as an agent runs: 1. Lifecycle events so your UI knows where the agent is. 2. Text messages that stream tokens. 3. Tool calls so your UI can prefill a form with any required arguments. 4. State updates that keep your UI in sync with the agent. 5. Special events for human approvals, rich media, and custom needs. All of these events travel over standard transports (SSE, WebSockets, or plain HTTP) as JSON. As a result, you can build a frontend that stays in sync with the agent's progress without having to invent a custom process to make this happen. For example, building a human-in-the-loop workflow becomes an off-the-shelf component you can integrate rather than build from scratch. CopilotKit🪁 is the creator of AG-UI, and you can use it when building frontend applications pretty much anywhere: • React • Angular • Vue • React Native • Slack • Teams • Discord • WhatsApp • Telegram Here is the link for you to check it out: Thanks to the CopilotKit team for partnering with me on this post.

Santiago

17,438 Aufrufe • vor 4 Monaten