i succeffully added redux-toolkit to my react-native project, work properly. But I can not add reactotron.
thats my ReactotronConfig.js
import Reactotron, {
trackGlobalErrors,
asyncStorage,
} from "reactotron-react-native";
import { reactotronRedux } from "reactotron-redux";
Reactotron.configure({
name: "my-app",
})
.use(asyncStorage())
.use(trackGlobalErrors())
.useReactNative({
storybook: true,
})
.use(reactotronRedux())
.connect();
export default Reactotron;
and store/index.tsx,
import { persistReducer, persistStore } from "redux-persist";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { configureStore } from "@reduxjs/toolkit";
import rootReducer from "./reducers";
import Reactotron from "../../ReactotronConfig";
const persistConfig = {
key: "root",
storage: AsyncStorage,
};
const persistedReducer = persistReducer(persistConfig, rootReducer);
export const store = configureStore({
reducer: persistedReducer,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false,
}),
enhancers: __DEV__ ? [Reactotron.createEnhancer!()] : [], // GETS TYPE ERROR and Property 'createEnhancer' does not exist on type 'ReactotronReactNative'.ts(2339)
});
export const persistor = persistStore(store);
how can i add Reactotron to my store index file ? thanks for any help