Why does Expo create React native app with old versions of dependencies?

Viewed 787

So I encountered a lot of problems with dependencies for example I can't install 'react-leaftlet' to use map because it conflicts things. I checked brand new expo react-native app dependencies' versions and it looks like some of them are old versions.

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~40.0.0",
    "expo-status-bar": "~1.0.3",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
    "react-native-web": "~0.13.12"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0"
  },
  "private": true
}

For example react should be 17.0.1, babel/core should be 7.13 and so on. It doesn't allow me to update. By the way my expo version is the latest.

1 Answers

When you use expo's latest version, it's not necessary that your expo will ship with the latest React version or the latest React native version.

Expo comes with a lot of other packages (some of it are its own packages, some are third party). Therefore, all the packages used in an Expo version need to be compatible with whatever version of React they are using.

If they are not compatible, expo needs to change and update its own packages, at the same time, wait for other third party packages they use to be compatible with React's latest version, in which time the React team may perhaps come out with another version.

Such a task takes time, resources and effort from several different teams. Therefore, expo uses the React version that is compatible with all the packages they use.

The React environment (including React Native) is constantly changing and updating. This has been the case for quite some time now. So, you should really not expect Expo's latest version to always ship with the latest React or the latest any other package that they use.

There is also the matter whether the latest React native version is using the latest React version as well.

Hope you get my drift. A lot of packages, a lot of different teams, an ever changing React environment, costs, effort, time all of these play a vital role in deciding whether to upgrade to React's latest version, which currently is 17, or not.

But, give them some time, they will update to the latest version soon enough. :)

Related