Victory-native: Include documentation for and test against create-react-native-app

Created on 29 Mar 2017  路  17Comments  路  Source: FormidableLabs/victory-native

We've had some people running into issues when trying to use victory-native with create-react-native-app and Expo. The most recent one appears to be due to a missing font on Android due to the use of Menlo: https://github.com/FormidableLabs/victory-native/blob/83ec78a88219898e9548653d93cc0e02520717b4/demo/demo.js#L39

You may want to work it into your testing workflow to make sure that victory-native works as expected in CRNA as you release new versions. We actually include it in our version of UIExplorer in Expo, called native-component-list, but we don't always update it to latest.https://github.com/expo/native-component-list/blob/master/screens/SVGScreen.js

Most helpful comment

@chrisbolin - you'll need to update the version of Expo on your phone / in your simulator for that

All 17 comments

@brentvatne I'm not actively working on victory-native currently, but CRNA is close to my heart so would like to help make this happen. Will take this internally with @boygirl who is the product owner for Victory, and @chrisbolin who's working on it as well.

In terms of Expo/Victory compatibility, we currently require minimum [email protected], and the Expo fork is currently at 5.1.2.

That said, I don't know if

  • That fork corresponds to the latest react-native-svg version in a released Expo app
  • There is a reason why we need that .5 patch
  • How hard would it be for you to bump to higher patch in Expo

We're on the latest version as per https://github.com/react-native-community/react-native-svg/releases (although we actually pulled in the native side without updating the version for 5.1.3, awkward, I forget what the reason was for that). Is there even a 5.1.5?

We update on every release of react-native-svg on a monthly basis, we use the latest version available about a week after the newest React Native release.

edit: maybe I didn't make it so clear in the original post, I think everything works fine now except for the "Menlo" font, but just wanted to have a proper discussion place for ensuring the compatibility continues.

Seems like there is 5.1.6 on npm. But I'll wait for Lauren/Chris to provide context, not sure if there is a functional requirement there.

@brentvatne thanks for the heads up on the font issue!

I made https://github.com/FormidableLabs/victory-native/pull/71 to deal with immediate font issue. I'll keep this issue open as forum for discussing testing against CRNA

It appears someone ran into an issue with victory-native and CRNA here: https://github.com/react-community/create-react-native-app/issues/159

Hello! I've been trying to get victory-native to work in my Expo app, but no luck so far. The Expo simulator crashes whenever I try to navigate to a page where I've rendered any of the victory-native elements (ex: a page with just ). I need to finish up a project and would love to incorporate some data viz so would greatly appreciate a fix or any suggestions!

Released a new CRNA template project. Don't have time just now to test victory-native against it, but there's obviously a lot of interest in using them together so it'd be cool if someone gets the chance to make sure they're still lining up.

thanks @dikaiosune! I hope to have time to look into this in the next week.

@dikaiosune will i automatically get the new CRNA template if i use 0.0.6? just checking, as 0.0.6 has been out for a while now

I can confirm that [email protected] plays well with [email protected]. 馃憤馃憤

I'll keep this issue open to see if we want to ship a CRNA/expo version of our demo, or at least test with it.

@briavicenti would you mind giving your app a shot with [email protected]? If that doesn't work, just open up a new victory-native issue. I'll keep this one focused on CRNA testing.

@brentvatne @jevakallio @dikaiosune do y'all have any suggestions on what might work best for victory-native CRNA testing / demoing? I don't want the default demo in victory-native to _require_ expo. But we could have another demo? Or what would be the simplest way of testing that the lib works with expo? Do I have to use the expo app, or could this be done in CI?

@chrisbolin - You'd have to use the Expo app to test it -- it should always remain compatible until the version of react-native-svg changes on either Expo or victory-native. We could probably set something up with appr to deploy a new version of this demo app with the new version of victory-native to make manual testing easier. Anything beyond that would require using something like Appetize.io.

thanks @brentvatne!

i know this is not right venue for this, but I've noticed that CRNA has been failing the first time I use it on projects (including this one) with the error

Uncaught Error: 16.0.0 is not a valid SDK version. Options are 15.0.0, 14.0.0, ...

If i modify app.json and use 15.0.0 it works to run npm start. Then (and this is where it gets strange) I can kill the process, change it back to 16.0.0, and restart it - and it works. I've had these exact steps happen to me on two fresh CRNA projects.

@chrisbolin - you'll need to update the version of Expo on your phone / in your simulator for that

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChrisGatzo picture ChrisGatzo  路  3Comments

kkemple picture kkemple  路  6Comments

xinhash picture xinhash  路  4Comments

WhyX picture WhyX  路  6Comments

ararog picture ararog  路  4Comments