Installations
npm install redux-flipper
Developer
jk-gan
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
NPM Version
Statistics
159 Stars
107 Commits
21 Forks
5 Watching
17 Branches
10 Contributors
Updated on 29 Oct 2024
Languages
TypeScript (90.74%)
JavaScript (9.26%)
Total Downloads
Cumulative downloads
Total Downloads
10,494,319
Last day
8.6%
7,736
Compared to previous day
Last week
7.3%
37,257
Compared to previous week
Last month
-4.3%
163,929
Compared to previous month
Last year
-14.3%
2,978,299
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Redux Flipper
Redux middleware for Flipper. It can log redux 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
- For
- Redux or Redux-Toolkit
Get Started
- Install redux-flipper middleware and
react-native-flipper
in your React Native app:
1yarn add redux-flipper react-native-flipper 2# for iOS 3cd ios && pod install
- Add the middleware into your redux store:
1import { createStore, applyMiddleware } from 'redux'; 2 3const middlewares = [ 4 /* other middlewares */ 5]; 6 7if (__DEV__) { 8 const createDebugger = require('redux-flipper').default; 9 middlewares.push(createDebugger()); 10} 11 12const store = createStore(RootReducer, applyMiddleware(...middlewares));
Redux Toolkit
1const middlewares = [ 2 /* other middlewares */ 3]; 4 5if (__DEV__) { 6 const createDebugger = require('redux-flipper').default; 7 middlewares.push(createDebugger()); 8} 9 10const store = configureStore({ 11 reducer: {}, 12 middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(middleware), 13});
- Install flipper-plugin-redux-debugger in Flipper desktop client:
Manage Plugins > Install Plugins > search "redux-debugger" > Install
- Start your app, then you should be able to see Redux Debugger on your Flipper app
Optional Configuration
State whitelisting
Many times you are only interested in certain part of the Redux state when debugging. You can pass array of string which have to match to the root key of the Redux state.
For example if Redux schema is something like this and you are only interested in user then you can whitelist only that part of the state
1type ReduxState = { 2 todos: string[]; 3 notifications: string[]; 4 user: { 5 name: string; 6 }; 7};
1let reduxDebugger = createDebugger({ stateWhitelist: ['user'] });
If you app has very big state tree it is also good idea to whitelist certain keys from Redux state otherwise Flipper can be very slow.
Resolve cyclic reference
Redux Debugger does not support cyclic reference objects by default as resolving it makes application slow. This feature can be enabled by passing { resolveCyclic: true }
into createDebugger
.
This is just a temporary solution if debugging is urgent. It is advisable to restructure your redux state structure.
For more information about cyclic reference, visit MDN Cyclic Object.
1let reduxDebugger = createDebugger({ resolveCyclic: true });
Actions Blacklist
You may specify an actions blacklist the same way as with React Native Debugger, by providing an
array of strings to match against the action.type field.
This feature can be enabled by passing { actionsBlacklist }
into createDebugger
,
where actionsBlacklist
is an array of strings.
For example:
1const actionsBlacklist = ['EVENTS/', 'LOCAL/setClock']; 2const reduxDebugger = createDebugger({ actionsBlacklist });
This will exclude any actions that contain the substrings in the blacklist. So an action with type
EVENTS/foo
will not be sent to the redux debugger flipper plugin, but an action with type
LOCAL/anotherAction
will.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 9/15 approved changesets -- score normalized to 6
Reason
9 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 24 are checked with a SAST tool
Score
3
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to redux-flipper
redux-flipper-colorized
Redux middleware for flipper with colorized
react-native-flipper
Flipper bindings for React Native
flipper-common
Server & UI shared Flipper utilities
flipper-server-client
Lightweight abstraction to connect to Flipper Server and provide an API to interact with it