miukimiu / react-kawaii

Cute SVG React Components
https://react-kawaii.vercel.app/
MIT License
2.91k stars 104 forks source link

Works in React Native? #20

Closed raisiqueira closed 5 years ago

raisiqueira commented 6 years ago

Hi! This library work with React Native?

miukimiu commented 6 years ago

Hello @raisiqueira!

I never tried but I believe it works. Any of the React Kawaii components are basically SVGs. So, I don't see a reason it wouldn't work.

Thanks!

miukimiu commented 6 years ago

Not sure if this is the best example but I forked a skeleton for a React Native Web application on Codesandbox and included the React Kawaii. It worked well: https://codesandbox.io/s/243r0784jn

jzarca01 commented 5 years ago

it doesn't

Invariant Violation: View config not found for name path. Make sure to start component names with a capital letter.

This error is located at:
- in path
- in defs
- in svg
- in div
- in w...
miukimiu commented 5 years ago

Hi @jzarca01,

Yes, it doesn't. I realized a few days ago. I'm reopening this issue! 🙂

jzarca01 commented 5 years ago

I'm working on it as we speak using react-native-svg

If everything goes well, it should be done by the end of the year

miukimiu commented 5 years ago

I started working a few days ago in a project with React Native. It was my first time ever. Then I realized the way the SVGs are handled with React Native is different. Always learning! 😛

Thanks for helping with this issue!

jzarca01 commented 5 years ago

Ok i got it working https://github.com/jzarca01/react-native-kawaii

Since i modified a lot of things to make it work with react-native i won't open a pull request, but feel free to cherry pick things if you feel so ;)

And here's an example of how to use it https://github.com/jzarca01/react-native-kawaii-example

txbrown commented 5 years ago

@miukimiu I might be able to help with this as I'm interested in making it work in RN for some side projects.

I also believe this should have support for projects using expo without being ejected as a lot of people and examples repos in the community have their projects setup as such and this will increase overall usability of the package and more people using IMO.

miukimiu commented 5 years ago

@codenakama thanks!

I already have a branch with the RN code: https://github.com/miukimiu/react-kawaii/tree/new-site-and-react-native

We can talk on twitter and see how we can split the work.