1 - add flipper redux in your react-native project npm i --save-dev redux-flipper react-native-flipper
2 - install Flipper in oyr system (https://fbflipper.com/)
3 - install redux-debugger plugin in flipper, (not in project, in Flipper), from > More > Add Plugins, > (in my case works) Redux debugger for flipper 2.0.2
4 - Enable redux debugger ( from Flipper) The redux-debugger plugin will be listed in the disabled plugin section. Enable the plugin to get started. Disabled > Redux Debugger > Enable Plugin (maybe you can start yur project to do this step, if is this case, return to this step next)
5 - configure your store (redux toolkit in my case) example from my store:
import { configureStore, Store } from "@reduxjs/toolkit";
import { IBookState, BookSlice } from "../bookSlice/BookSlice";
import { IUserState, UserSlice} from '../userSlice/UserSlice'
export interface IApplicationState {
readonly bookState: IBookState;
readonly userState: IUserState;
}
const middlewares: any[] = [];
if (__DEV__) {
const createDebugger = require("redux-flipper").default;
middlewares.push(createDebugger());
}
export const store: Store<IApplicationState> = configureStore({
reducer: {
bookState: BookSlice.reducer,
userState: UserSlice.reducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false,
}).concat(middlewares),
});
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
6 - Add var flipper version in your android/gradle.properties (in your project)
FLIPPER_VERSION =0.212.0 (in my case)
7 - and then in the current directory ./gradlew clean
8 - return to the root folder project and start you app
9 - next you can view your redux state
Flipper
in your project, not redux middleware. – Paillette