You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
I am trying to create a reactotron config for a react native application using redux-toolkit. My reactatron-config.ts is this:
importAsyncStoragefrom'@react-native-async-storage/async-storage';importReactotronfrom'reactotron-react-native'import{reactotronRedux}from'reactotron-redux'import{NativeModules}from'react-native';// grabs the ip addressconsthost=NativeModules.SourceCode.scriptURL.split('://')[1].split(':')[0];constreactotron=Reactotron.setAsyncStorageHandler(AsyncStorage)// AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from.configure({ host })// controls connection & communication settings.useReactNative()// add all built-in react native plugins.use(reactotronRedux()).connect()// let's connect!exportdefaultreactotron
And my store.ts looks like this:
importsellSlicefrom'./sellSlice';import{configureStore}from'@reduxjs/toolkit';importaccountSlicefrom'./accountSlice';importauthSlicefrom'./authSlice';importstoreSlicefrom'./storeSlice';importReactotronfrom'../reactatron-config'exportconststore=configureStore({reducer: {auth: authSlice.reducer},middleware: (getDefaultMiddleware)=>getDefaultMiddleware().concat(Reactotron.createEnhancer()),})// Infer the `RootState` and `AppDispatch` types from the store itselfexporttypeRootState=ReturnType<typeofstore.getState>// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}exporttypeAppDispatch=typeofstore.dispatch
No overload matches this call.
Overload 1 of 2, '(items: readonly Middleware<any, any, Dispatch<AnyAction>>[]): MiddlewareArray<[ThunkMiddleware<{ auth: authState; account: accountState; store: storeState; sell: sellState; }, AnyAction, undefined>, ...Middleware<...>[]]>', gave the following error.
Argument of type 'StoreEnhancer<{}, {}>' is not assignable to parameter of type 'readonly Middleware<any, any, Dispatch<AnyAction>>[]'.
Overload 2 of 2, '(...items: readonly Middleware<any, any, Dispatch<AnyAction>>[]): MiddlewareArray<[ThunkMiddleware<{ auth: authState; account: accountState; store: storeState; sell: sellState; }, AnyAction, undefined>, ...Middleware<...>[]]>', gave the following error.
Argument of type 'StoreEnhancer<{}, {}>' is not assignable to parameter of type 'Middleware<any, any, Dispatch<AnyAction>>'.
Types of parameters 'next' and 'api' are incompatible.
Type 'MiddlewareAPI<Dispatch<AnyAction>, any>' is not assignable to type 'StoreEnhancerStoreCreator<{}, {}>'.
Type 'MiddlewareAPI<Dispatch<AnyAction>, any>' provides no match for the signature '<S = any, A extends Action<any> = AnyAction>(reducer: Reducer<S, A>, preloadedState?: PreloadedState<S>): Store<S & {}, A>'.ts(2769)
What am I am missing?
The text was updated successfully, but these errors were encountered:
I am trying to create a reactotron config for a react native application using redux-toolkit. My
reactatron-config.ts
is this:And my
store.ts
looks like this:I am getting an error at:
And the error is:
What am I am missing?
The text was updated successfully, but these errors were encountered: