Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

ReactNative + Redux で開発していたら表題のエラーが出ました。

```Bash
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `App`.

This error is located at:
    in RCTView (at View.js:44)
    in Container (at connectStyle.js:384)
    in Styled(Container) (at App.js:41)
    in Provider (at App.js:40)
    in App (at withExpoRoot.js:22)
    in RootErrorBoundary (at withExpoRoot.js:21)
    in ExpoRootComponent (at renderApplication.js:34)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AppContainer (at renderApplication.js:33)
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:5630:10 in createFiberFromElement
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:9027:12 in createChild
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:9370:10 in reconcileChildrenArray
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:10306:6 in reconcileChildren
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:10734:4 in updateHostComponent
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14091:21 in performUnitOfWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14129:41 in workLoop
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14226:15 in renderRoot
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15193:17 in performWorkOnRoot
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15090:24 in performWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15047:14 in performSyncWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14925:19 in requestWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14711:16 in scheduleWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15429:15 in scheduleRootUpdate
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:16142:20 in render
- node_modules/react-native/Libraries/ReactNative/renderApplication.js:59:52 in renderApplication
- node_modules/react-native/Libraries/ReactNative/AppRegistry.js:101:10 in run
- node_modules/react-native/Libraries/ReactNative/AppRegistry.js:195:26 in runApplication
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:349:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:106:26 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:297:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:105:17 in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue
```

# package.json

```json
{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^32.0.0",
    "native-base": "^2.12.1",
    "react": "^16.8.6",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-easy-grid": "^0.2.1",
    "react-navigation": "^3.9.1",
    "react-redux": "^7.0.1",
    "redux": "^4.0.1"
  },
  "devDependencies": {
    "babel-eslint": "^10.0.1",
    "babel-preset-expo": "^5.0.0",
    "eslint": "^5.16.0",
    "eslint-cli": "^1.1.1",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-import-resolver-webpack": "^0.11.1",
    "eslint-loader": "^2.1.2",
    "eslint-plugin-import": "^2.17.2",
    "eslint-plugin-jsx-a11y": "^6.2.1",
    "eslint-plugin-react": "^7.13.0",
    "eslint-plugin-react-redux": "^3.0.1",
    "schedule": "^0.4.0"
  },
  "private": true
}
```

# 解決策
`react-redux` のバージョンを下げたらいけました。
[公式にもちゃんと書いてあり](https://github.com/reduxjs/react-redux#react-native)ますが、React Native
 で使うときは `5.x系` じゃないとダメらしい。


**Before**
`"react-redux": "^7.0.1"`

**After**
`"react-redux": "^5.0.1"` 


一生アプリ使えないかと思いましたがこれでやっと開発できそう。（苦しかった。）
[Twitter](https://twitter.com/DYoko0701) とかやってるのでフォローとかしてくれたら死ぬほど死にます。