Summary
Would love to use Liveline in React Native apps. The current implementation is canvas-based (HTML <canvas> + requestAnimationFrame) which doesn't run in RN environments.
Use case
Real-time price charts and live data dashboards are a common need in React Native apps (trading, monitoring, sports data). Liveline's feature set — smooth lerp, candlestick mode, multi-series, momentum indicators — is a strong match for native mobile, where equivalent libraries are sparse.
Technical gap
| Web |
React Native equivalent |
<canvas> + 2D context |
@shopify/react-native-skia or react-native-svg |
ResizeObserver |
View onLayout callback |
| Mouse events (hover/scrub) |
PanResponder / react-native-gesture-handler |
CSS cursor, className, style: CSSProperties |
StyleSheet / ViewStyle |
react-native-skia is the most capable option — it exposes a GPU-accelerated Skia canvas with a React API, supports Path, Paint, gradients, and runs at 60/120fps. The drawing logic in src/draw/ should map fairly directly to Skia primitives.
Possible approaches
- Separate
liveline-native package — keeps the web bundle clean, ships its own peer deps (@shopify/react-native-skia, react-native-gesture-handler). Cleanest separation.
- Shared core + platform renderers — extract engine/math/lerp logic into a renderer-agnostic core, then ship thin
liveline/web and liveline/native entry points. More maintenance surface but avoids duplicating animation logic.
react-native-svg renderer — lighter peer dep than Skia, but SVG path updates have higher JS-thread overhead at 60fps; probably fine for non-degen use cases.
Happy to help
I'm willing to contribute a proof-of-concept Skia renderer if there's interest in the direction. Let me know if you'd prefer a separate package or a renderer abstraction in this repo.
Summary
Would love to use Liveline in React Native apps. The current implementation is canvas-based (HTML
<canvas>+requestAnimationFrame) which doesn't run in RN environments.Use case
Real-time price charts and live data dashboards are a common need in React Native apps (trading, monitoring, sports data). Liveline's feature set — smooth lerp, candlestick mode, multi-series, momentum indicators — is a strong match for native mobile, where equivalent libraries are sparse.
Technical gap
<canvas>+ 2D context@shopify/react-native-skiaorreact-native-svgResizeObserverViewonLayoutcallbackPanResponder/react-native-gesture-handlercursor,className,style: CSSPropertiesStyleSheet/ViewStylereact-native-skia is the most capable option — it exposes a GPU-accelerated Skia canvas with a React API, supports
Path,Paint, gradients, and runs at 60/120fps. The drawing logic insrc/draw/should map fairly directly to Skia primitives.Possible approaches
liveline-nativepackage — keeps the web bundle clean, ships its own peer deps (@shopify/react-native-skia,react-native-gesture-handler). Cleanest separation.liveline/webandliveline/nativeentry points. More maintenance surface but avoids duplicating animation logic.react-native-svgrenderer — lighter peer dep than Skia, but SVG path updates have higher JS-thread overhead at 60fps; probably fine for non-degen use cases.Happy to help
I'm willing to contribute a proof-of-concept Skia renderer if there's interest in the direction. Let me know if you'd prefer a separate package or a renderer abstraction in this repo.