Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

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 görüntüleme • 1 ay önce •via X (Twitter)

40 Yorum

James Ide profil fotoğrafı
James Ide1 ay önce

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

Gregory Moskaliuk profil fotoğrafı
Gregory Moskaliuk1 ay önce

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:

lauren profil fotoğrafı
lauren1 ay önce

beautiful

James Ide profil fotoğrafı
James Ide1 ay önce

Thank you!

Xuan Huang · 黄玄 profil fotoğrafı
Xuan Huang · 黄玄1 ay önce

@reactjs Beautiful UI Beautiful Writing Beautifully React Beautifully Native

Jamie Birch profil fotoğrafı
Jamie Birch1 ay önce

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

Christoph Nakazawa profil fotoğrafı
Christoph Nakazawa1 ay önce

Is this legal

James Ide profil fotoğrafı
James Ide1 ay önce

Oh dear

Samuel Scheit profil fotoğrafı
Samuel Scheit1 ay önce

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

parbez profil fotoğrafı
parbez1 ay önce

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

James Ide profil fotoğrafı
James Ide1 ay önce

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

James Ide profil fotoğrafı
James Ide1 ay önce

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.

parbez profil fotoğrafı
parbez1 ay önce

Thanks for the explanation

Spencer Taylor profil fotoğrafı
Spencer Taylor1 ay önce

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

Charles Vinette profil fotoğrafı
Charles Vinette1 ay önce

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

Internet Labs profil fotoğrafı
Internet Labs1 ay önce

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?

James Ide profil fotoğrafı
James Ide1 ay önce

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.

Selva profil fotoğrafı
Selva1 ay önce

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?

James Ide profil fotoğrafı
James Ide1 ay önce

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.

Selva profil fotoğrafı
Selva1 ay önce

Well said! The UI work is beautiful.

Ahmad profil fotoğrafı
Ahmad1 ay önce

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

Pavlo Nekrasov profil fotoğrafı
Pavlo Nekrasov1 ay önce

Expo always delivers

Colin Hunt profil fotoğrafı
Colin Hunt1 ay önce

Serious wow factor

Brian Hadu profil fotoğrafı
Brian Hadu1 ay önce

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

COURT profil fotoğrafı
COURT1 ay önce

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!

Serhii Y. profil fotoğrafı
Serhii Y.1 ay önce

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

Nitesh ₿⚡️ profil fotoğrafı
Nitesh ₿⚡️1 ay önce

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

Tomas Martykan profil fotoğrafı
Tomas Martykan1 ay önce

Very nice, GitHub link?

Azhar profil fotoğrafı
Azhar1 ay önce

“Cofounder at expo” ah I see

Salem Shamakh 🇵🇸 profil fotoğrafı
Salem Shamakh 🇵🇸1 ay önce

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

James Ide profil fotoğrafı
James Ide1 ay önce

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.

Hari · animata.design profil fotoğrafı
Hari · animata.design1 ay önce

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

Gregor profil fotoğrafı
Gregor1 ay önce

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

Stephen Rayner profil fotoğrafı
Stephen Rayner1 ay önce

GitHub repo?

Forti profil fotoğrafı
Forti1 ay önce

Make it open source 🥹

Juan Arreguin profil fotoğrafı
Juan Arreguin1 ay önce

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

Farzad Yousefzadeh profil fotoğrafı
Farzad Yousefzadeh1 ay önce

@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 😊

Benji T profil fotoğrafı
Benji T1 ay önce

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

Kgaugelo Kg profil fotoğrafı
Kgaugelo Kg1 ay önce

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.

James Ide profil fotoğrafı
James Ide1 ay önce

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.

Benzer Videolar

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 görüntüleme • 4 ay önce