React-Native 错误 - com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 't.apply')

时间:2021-07-31 06:05:02

标签: android reactjs react-native redux

我收到此错误。根据一些搜索,它是一个 redux 错误。但即使在实施解决方案之后,这个错误似乎也没有消失。我只在生产 Android 中看到这个,有什么方法可以在 prod 中调试哪个文件导致了这个?此外,任何解决方案都会有所帮助。

Store.js

export const createStore = (workflows: Workflows) => {

const appReducer = combineReducers({
    session: sessionReducer,
    ...workflows.getReducers()
});

const rootReducer = (state: any, action: any) => {
    // Clear state on 'RESET
    if (action.type === RESET_ACTION_TYPE) {
        state = undefined;
    }
    return appReducer(state, action);
};

const composeEnhancers = composeWithDevTools({});

const store = createReduxStore(
    rootReducer,
    composeEnhancers(applyMiddleware(thunk))
);

return store;
};

Package.json 依赖

"dependencies": {
"@ptomasroos/react-native-multi-slider": "^1.0.0",
"@react-native-community/cli-platform-android": "3.0.3",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-firebase/app": "^8.4.2",
"@react-native-firebase/crashlytics": "^8.4.4",
"@react-native-firebase/messaging": "^7.8.6",
"@types/react-redux": "^7.1.1",
"@udaan/ui-components": "github:udaan-com/ui-components",
"@udaan/ui-screens": "file:../pickily-screens",
"@ui-core/screens": "^1.2.13",
"buffer": "^5.6.0",
"clevertap-react-native": "^0.5.1",
"copy-to-clipboard": "^3.2.0",
"html-to-text": "^7.0.0",
"lottie-ios": "3.1.8",
"lottie-react-native": "3.5.0",
"moment": "^2.24.0",
"prop-types": "latest",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-appsflyer": "^6.2.42",
"react-native-bottom-sheet": "^1.0.3",
"react-native-camera": "^3.11.1",
"react-native-code-push": "^7.0.0",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "8.0.5",
"react-native-document-picker": "^3.5.4",
"react-native-geolocation-service": "^5.2.0",
"react-native-gesture-handler": "^1.3.0",
"react-native-image-crop-picker": "^0.25.0",
"react-native-image-picker": "^1.0.1",
"react-native-in-app-review": "^3.1.1",
"react-native-linear-gradient": "^2.5.4",
"react-native-maps": "^0.27.1",
"react-native-mixpanel": "^1.2.0",
"react-native-otp-verify": "^1.0.4",
"react-native-photo-view": "^1.5.2",
"react-native-qrcode-scanner": "^1.2.1",
"react-native-razorpay": "^2.2.2",
"react-native-read-more-text": "^1.1.0",
"react-native-screens": "^2.18.0",
"react-native-shared-preferences": "^1.0.2",
"react-native-snap-carousel": "3.7.5",
"react-native-svg": "^12.1.1",
"react-native-video": "^5.0.0",
"react-native-webview": "^11.3.2",
"react-navigation": "^4.4.4",
"react-redux": "^7.2.4",
"react-router-native": "^5.2.0",
"redux": "^4.1.0",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.12.0",
"url-polyfill": "^1.1.7"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@react-native-community/eslint-config": "^1.1.0",
"@react-native-community/netinfo": "3.2.0",
"@types/jest": "^24.0.15",
"@types/react": "^17.0.3",
"@types/react-native": "^0.63.51",
"@types/react-navigation": "^3.4.0",
"@types/react-router-native": "^5.1.0",
"@types/react-test-renderer": "^16.8.2",
"babel-jest": "^25.1.0",
"eslint": "^6.7.2",
"jest": "^25.1.0",
"jetifier": "^1.6.6",
"metro-react-native-babel-preset": "^0.57.0",
"react-native-clean-project": "^3.3.0",
"react-test-renderer": "16.9.0",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"tslint-eslint-rules": "^5.4.0",
"tslint-react": "^4.1.0",
"typescript": "^4.2.3"
},

0 个答案:

没有答案