Skip navigation
react-native-livechart is live 🥳
0:00 / 0:20

react-native-livechart is live 🥳

Lennart Brandt

@brandtnewlabs5.3K followers

Visit on X
546 likesDownloadOriginal post

40,523 views

react-native-livechart is live 🥳 Beautiful, reliable live charts for React Native: (multi-) line and candlestick, smooth at 60fps even with 10+ trades a second coming in. TL;DR: npm install react-native-livechart; deep dive 👇

53 Comments

Comments from the original post on X (Twitter)

  • Lennart Brandt's profile picture

    @brandtnewlabs

    I've spent years building in fintech and crypto, and the same problem kept finding me: a live chart that stays smooth and leak-free on mobile, even when the data is pouring in 🌊 Most React Native charts can't. They fall apart the moment the market speeds up!

    23 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    So I built my own. A few companies put the early versions into production, and their feedback shaped what shipped today: another pass on performance, adjustable props and config, and a move to the latest @ReactNativeSkia The problem I'd chased for years, finally solved 💪

    18 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    It comes down to one decision: the entire render loop runs on the UI thread. New data lands in a Reanimated SharedValue. A useFrameCallback worklet reads it fresh every frame and rebuilds the Skia path. React barely re-renders, so nothing competes for the JS thread.

    24 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    That same design is why it never leaks. No per-frame allocations: it reuses a Skia PathBuilder and detach()es a fresh immutable path each frame. The loop just polls the SharedValue: a write is a mutation the next frame reads. Nothing to subscribe to, nothing to clean up.

    13 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    Staying smooth under load comes down to two more details: 1) Pixel-column decimation: 2,400 points collapse to about the canvas width, and every spike still survives (min/max per column) 2) A Fritsch–Carlson monotone spline: smooth curves that never invent peaks your data doesn't have

    13 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    All of that quietly powers what you actually see: • Line and candlestick with live morphing • Multi-series with a toggleable legend • A scrub crosshair with a tooltip • Momentum detection & degen effects • Trade markers and a trade stream • Neat Loading states Every layer draws into a single Skia canvas. One repaint, no JS cost.

    8 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    And it's yours to shape. Theming and configuration go deep: light and dark, an accent-driven palette, or simply pass true / false / a config object for any overlay. It adapts to your brand without a fork.

    7 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    I didn't guess at any of this: 🤖 I profiled every regression on real devices with @callstackio's agent-device: frame timing, CPU, and memory 👨‍⚕️ I held the codebase to a 100/100 health score with @aidenybai's react-doctor. 🧪 Pure tick functions, 95% test coverage.

    43 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    And none of it exists without @benjitaylor's liveline: the React canvas chart whose feel I aimed for in react-native. This is a full reimagining of it with Skia, Reanimated, and Gesture Handler. Thank you @Shopify, @wcandillon and @swmansion for the foundations ❤️

    25 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    react-native-livechart is open source, MIT, and live now. npm install react-native-livechart 📚 Docs: 📱 Repository: Tell me what you're building with it.

    21 likes

  • Expo's profile picture

    @expo

    @brandtnewlabs we are building a "demos" page where we want to feature beautiful interactions like this. Would you be okay with us featuring your work there? It will be curated so your work will be alongside other talented creators. And it will link to your repos.

    8 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    Hyped! Let’s do it!!!

    4 likes

  • Enzo Manuel Mangano's profile picture

    @reactiive_

    👏👏👏

    2 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    🫶🫶🫶

    1 like

  • Samuel Beaulieu's profile picture

    @beaulieusam

    Amazing work! Will definitely give this a try!

    2 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    Thank you! Let me know how it goes and feel free to request features 😁

    1 like

  • Nate's profile picture

    @natedevxyz

    love the animations with both threads locked at 60, congrats on the release

    2 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    Thanks so much, Nate!

    1 like

  • Hewad Mubariz's profile picture

    @hewad_mubariz

    That's so cool congrats

    2 likes

  • Lennart Brandt's profile picture

    @brandtnewlabs

    Thank you 🙏