Victory-native: React Native for Web support via svg.js

Created on 19 Oct 2017  路  4Comments  路  Source: FormidableLabs/victory-native

I'm currently using react native for web to create a multi platform app with almost single code base, is there any plans to support react native for web, can I contribute with this support?

Most helpful comment

@esutton with react native for web the code reusability is higher, as much as this project gets contributions the code reusability goes even more possible. That's what I'm planning with victory-native, by having a Line.web.js I can make sure to use svg.js to emit code for web browsers only.

All 4 comments

@ararog You are using this https://github.com/necolas/react-native-web ?

I am interested in re-using ny react-native app code in react or maybe react-native-web is a solution.

@esutton with react native for web the code reusability is higher, as much as this project gets contributions the code reusability goes even more possible. That's what I'm planning with victory-native, by having a Line.web.js I can make sure to use svg.js to emit code for web browsers only.

@ararog Wouldn't a simple webpack alias victory-native -> victory work here? This is the same way create-react-app supports react-native-web.

Thanks @Elijen! That's exactly what's needed to get victory-native to work on RNW. Here's sample webpack config:

config.resolve.alias['victory-native'] = 'victory'
Was this page helpful?
0 / 5 - 0 ratings