Combine responsive app with built-in app

I want to put React app files into React Native app.

I've used React Native Web to support React Native components in a React app.

Last step. I want to put all files from the React App folder into the React Native App folder.

difference in Package.json

React Package.json:

{
  "name": "appname",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "react-scripts": "1.0.10"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

      

React Native Package.json:

{
    "name": "appname",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest"
    },
    "dependencies": {
        "react": "16.0.0-alpha.12",
        "react-native": "0.47.1",
        "react-native-windows": "0.47.0-rc.5"
    },
    "devDependencies": {
        "babel-jest": "20.0.3",
        "babel-preset-react-native": "2.1.0",
        "jest": "20.0.4",
        "react-test-renderer": "16.0.0-alpha.12",
        "rnpm-plugin-windows": "^0.2.7"
    },
    "jest": {
        "preset": "react-native"
    }
}

      

So, is it possible to combine two packages together?

+3


source to share


1 answer


For your native app, you can use package.json from React Native, no need to merge. You don't need to "react" and similar libraries in the native application. If your components are all React Native for the Web, they won't be a problem in native.



+1


source







All Articles