Search code examples
reactjsreact-nativewebpacktranspiler

Transpile React to React Native on a regular basis?


It might be a stupid question to ask, but searching on the web did not give me any conclusive result: If you want to maintain only a single code base, does it make sense to write your code in React and transpile to React Native? A client has the idea to have both an App (ideally for iOS and Android at the end) and a website all deduced from a single source.

I have some experience with webpack and I know it can be painful to configure, but is there some definite guide by Facebook on that issue which I missed?

References


Solution

  • One alternative is to run your react-native application on the web. The go to library for that is react-native-web.