Closed hshoff closed 2 years ago
I agree, I am in the process of building react app and react-native app, so I would be highly inclined towards using a solution that can be implemented across the two platforms.
Hi @hshoff, this looks like an awesome package, and if @williaster is involved, I'm sure its the next great thing. I'd love to use this on a project I'm kicking off at work, but we have a strong need to support mobile. I'm wondering where this issue falls on your roadmap. I also wonder if this is the only issue that prevents use of vx on mobile (e.g. is there further support needed for touch instead of a cursor?).
Hi @colinhiggins, thanks for checking out vx!
Are you looking to use vx on mobile web or in an iOS/Android app? If mobile web, you should be fine to start using vx. iOS/Android app support should be coming in the future.
An iOS/Android app. Probably iOS first. We could try to render a webview in the app I suppose, but ideally we wouldn't have to resort to that.
@colinhiggins gotcha, vx doesn't support those platforms yet.
in react native it should probably be done using ART built-in lib: https://github.com/facebook/react-native/tree/master/Libraries/ART. No one bothered to prepare official docs, here's all I found: https://github.com/react-native-china/react-native-ART-doc/blob/master/doc.md
Chatted in Slack but worth mentioning here, it would be nice to support canvas
along with svg
@hshoff It has been one and half year.. Is there any plan to supoort this?
Not a priority for me right now. Happy to read over proposals if anyone has one.
Hi, I've opened a draft PR for a fork that I've been working on, with react-primitives
support. There's an injection API and extension resolving, so you can import svg components with:
import { Svg, G, Defs } from '@vx/primitives'
,
and they resolve to:
<svg>
, <g>
, etc on web,
or to require('react-native-svg').Defs
or require('react-sketchapp').Defs
, etc
d3
meets Sketch.app 🙂For anyone that does need dataviz on React Native, what alternatives are you using in the meantime?
For anyone that does need dataviz on React Native, what alternatives are you using in the meantime?
Hi, I've published a couple of npm
modules from my vx-primitives
fork: @vx-primitives/primitives
, @vx-primitives/shape
, etc which should work on React Native, react-sketchapp
, etc. It's a little outdated since it's time-consuming to merge changes downstream. I'd be happy to merge any contributions to the fork and publish the rest of the visx
packages under vx-primitives
once/if they're implemented.
It would be great if this feature gets rolled out.
vx should work on web, native, vr, everywhere. The current implementation depends on
react-dom
which means it's only available on web.@lelandrichardson's talk
React as a Platform
https://www.youtube.com/watch?v=hNwQPJy-XZY https://github.com/lelandrichardson/react-primitives-art