1.0.3 • Published 2 years ago

use-reducer-flipper v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

UseReducer Flipper

screenshot of the plugin

UseReducer Logger for Flipper. It can log useReducer actions and show inside Flipper using flipper-plugin-redux-debugger .

Support

  • React Native
    • For react-native >= 0.62, flipper support is enabled by default
    • For react-native < 0.62, follow these steps to setup your app
  • UseReducer

Get Started

  1. Install useReducer-flipper and react-native-flipper in your React Native app:
yarn add use-reducer-flipper react-native-flipper
# for iOS
cd ios && pod install
  1. Add the logger into your useReducer store:
import flipperLogger from 'use-reducer-flipper';

export const StateProvider = ({ children }) => {
  const [value, dispatch] = useReducer(__DEV__ ? flipperLogger(reducers) : reducers, initialState);

  return <StateContext.Provider value={[value, dispatch]}>{children}</StateContext.Provider>;
};
  1. Install flipper-plugin-redux-debugger in Flipper desktop client:
Manage Plugins > Install Plugins > search "redux-debugger" > Install
  1. Start your app, then you should be able to see Redux Debugger on your Flipper app
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago