godaddy / svgs

svgs is a compatiblity layer between svg and react-native-svg
MIT License
191 stars 31 forks source link

Can we do the same to div and View as svgs do? #9

Closed pcompassion closed 7 years ago

pcompassion commented 7 years ago

Hello, thanks for the svgs. Sure helped us to adopt to RN and react web at the same time.

I'm curious if we could do the same thing to div (map div to View) as svgs map svg to Svg ?

3rd-Eden commented 7 years ago

Hey,

Thanks for the kind words, I'm glad you enjoyed the project and found it useful. We do have some internal tools that help with the conversion of <div>, <h2> to <View> and <Text> but there are no plans to open source that (yet?). The best bet, for now, is either to write such modules your self using the same pattern as used in this library or use the react-native-web library.

pcompassion commented 7 years ago

So the branching occurs because react would find "abc.react.js" first and web would look for "abc.js" for import "abc", correct?