Home > Mobile >  How to combine react and react-native projects?
How to combine react and react-native projects?

Time:05-26

I have created a website with react.js, Material-UI, and node.js. Now I want to create a mobile app for that website with React-native. I have used redux,react-redux, and saga on the website. I am new to react-native.

I want to know, Is it possible to create a mobile app and website in a single project structure, If possible then how? Because I don't want to repeat the same state and API calling procedure two times.

CodePudding user response:

React.js uses HTML to render pages and React native doesn't support HTML so you can't use direct HTML.

You can buy react native theme that suits your need and you can re-use services and api call logic from react code.

Theme: https://codecanyon.net/search/react native

CodePudding user response:

You can't just use your whole code into the react native app. First and foremost, you must adhere to the react native architecture before creating your UI with react native components. https://reactnative.dev/docs/getting-started The most of the assistance will be found here.

There is also the option of creating a new react-native project and using webview to show your entire website there. https://github.com/react-native-webview/react-native-webview

  • Related