Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 1 месяц назад •via X (Twitter)

Комментарии: 40

Фото профиля James Ide
James Ide1 месяц назад

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

Фото профиля Gregory Moskaliuk
Gregory Moskaliuk1 месяц назад

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
lauren1 месяц назад

beautiful

Фото профиля James Ide
James Ide1 месяц назад

Thank you!

Фото профиля Xuan Huang · 黄玄
Xuan Huang · 黄玄1 месяц назад

@reactjs Beautiful UI Beautiful Writing Beautifully React Beautifully Native

Фото профиля Jamie Birch
Jamie Birch1 месяц назад

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
Christoph Nakazawa1 месяц назад

Is this legal

Фото профиля James Ide
James Ide1 месяц назад

Oh dear

Фото профиля Samuel Scheit
Samuel Scheit1 месяц назад

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
parbez1 месяц назад

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

Фото профиля James Ide
James Ide1 месяц назад

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

Фото профиля James Ide
James Ide1 месяц назад

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
parbez1 месяц назад

Thanks for the explanation

Фото профиля Spencer Taylor
Spencer Taylor1 месяц назад

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

Фото профиля Charles Vinette
Charles Vinette1 месяц назад

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

Фото профиля Internet Labs
Internet Labs1 месяц назад

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
James Ide1 месяц назад

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
Selva1 месяц назад

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
James Ide1 месяц назад

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
Selva1 месяц назад

Well said! The UI work is beautiful.

Фото профиля Ahmad
Ahmad1 месяц назад

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

Фото профиля Pavlo Nekrasov
Pavlo Nekrasov1 месяц назад

Expo always delivers

Фото профиля Colin Hunt
Colin Hunt1 месяц назад

Serious wow factor

Фото профиля Brian Hadu
Brian Hadu1 месяц назад

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

Фото профиля COURT
COURT1 месяц назад

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.
Serhii Y.1 месяц назад

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

Фото профиля Nitesh ₿⚡️
Nitesh ₿⚡️1 месяц назад

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

Фото профиля Tomas Martykan
Tomas Martykan1 месяц назад

Very nice, GitHub link?

Фото профиля Azhar
Azhar1 месяц назад

“Cofounder at expo” ah I see

Фото профиля Salem Shamakh 🇵🇸
Salem Shamakh 🇵🇸1 месяц назад

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

Фото профиля James Ide
James Ide1 месяц назад

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
Hari · animata.design1 месяц назад

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

Фото профиля Gregor
Gregor1 месяц назад

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

Фото профиля Stephen Rayner
Stephen Rayner1 месяц назад

GitHub repo?

Фото профиля Forti
Forti1 месяц назад

Make it open source 🥹

Фото профиля Juan Arreguin
Juan Arreguin1 месяц назад

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
Farzad Yousefzadeh1 месяц назад

@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
Benji T1 месяц назад

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

Фото профиля Kgaugelo Kg
Kgaugelo Kg1 месяц назад

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
James Ide1 месяц назад

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.

Похожие видео

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 просмотров • 4 месяцев назад