Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate native implementation to 'react-native-svg' #157

Merged
merged 8 commits into from
Jul 15, 2021
Merged

Migrate native implementation to 'react-native-svg' #157

merged 8 commits into from
Jul 15, 2021

Conversation

yfunk
Copy link
Contributor

@yfunk yfunk commented Jul 14, 2021

Description

Resolves #122

This pull request migrates all usage of @react-native-community/art in the native implementation to react-native-svg, since the former may be deprecated soon.

This will also restore compatibility with the Expo SDK as it includes react-native-svg.

Test plan

The native example in ./storybooks/native doesn't work for me, which is why all changes are currently untested.

The example app tries to import QRCode from "./lib", which doesn't seem to exist even after building the package. I'm also pretty sure Metro doesn't allow imports from parent directories without additional configuration. Therefore, if the example app isn't part of an active Storybooks setup I'm missing, I would just create a new native example project (taking react-native-builder-bob as a reference) .

TODO

  • Update native example
  • Test new implementation on Android
  • Test new implementation on iOS
  • Update README.md

package.json Outdated Show resolved Hide resolved
@rosskhanas
Copy link
Owner

rosskhanas commented Jul 15, 2021

I'm also pretty sure Metro doesn't allow imports from parent directories without additional configuration.

@yfunk, you are right. For that purpose, I made a storybook-native-watch script. It throws the code into the ./storybooks/native/lib. That can help you to make a native demo work 🙂

Also allow any version of the package to be used.
Add install instructions for 'react-native-svg' and update layout of Android and iOS screenshots to save some space.
@yfunk
Copy link
Contributor Author

yfunk commented Jul 15, 2021

For that purpose, I made a storybook-native-watch script.

I totally missed that one 😅

I tested the example app on Android and it renders the same way as the version using ART, however I'm currently unable to test it on iOS.

@react-native-community/art react-native-svg

I also updated README.md with the new install instructions and put the Android and iOS screenshots next to each other to save some space (and make the install instructions more visible).

@yfunk yfunk marked this pull request as ready for review July 15, 2021 12:33
@rosskhanas rosskhanas merged commit aa95461 into rosskhanas:master Jul 15, 2021
@rosskhanas
Copy link
Owner

I tested the example app on iOS and seems like it works well.

@rosskhanas
Copy link
Owner

@yfunk I just published v2.0.0. Hope all is good 🙏😂

Thank you for your help ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ART has been removed from Expo
2 participants