Được TopGit lập chỉ mục từ metadata GitHub: zalmoxisus/redux-devtools-extension có 13.5k sao, viết chủ yếu bằng JavaScript. Redux DevTools extension.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This repo is no longer the home of the redux-devtools-extension. The new home is https://github.com/reduxjs/redux-devtools. Please file your issues and PRs there.
⚠️⚠️⚠️🚨🚨🚨⚠️⚠️⚠️
Redux DevTools Extension
Installation
1. For Chrome
from Chrome Web Store;
or download extension.zip from last releases, unzip, open chrome://extensions url and turn on developer mode from top left and then click; on Load Unpacked and select the extracted folder for use
or build it with npm i && npm run build:extension and load the extension's folder ./build/extension;
or run it in dev mode with npm i && npm start and load the extension's folder ./dev.
2. For Firefox
from Mozilla Add-ons;
or build it with npm i && npm run build:firefox and load the extension's folder ./build/firefox (just select a file from inside the dir).
3. For Electron
just specify REDUX_DEVTOOLS in electron-devtools-installer.
4. For other browsers and non-browser environment
use remote-redux-devtools.
Usage
Note that starting from v2.7, window.devToolsExtension was renamed to window.__REDUX_DEVTOOLS_EXTENSION__ / window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__.
Note: Passing enhancer as last argument requires redux@>=3.1.0. For older versions apply it like here or here. Don't mix the old Redux API with the new one.
You don't need to npm install redux-devtools when using the extension (that's a different lib).
1.2 Advanced store setup
If you setup your store with middleware and enhancers, change:
Note that when the extension is not installed, we’re using Redux compose here.
To specify extension’s options, use it like so:
const composeEnhancers =
typeof window === 'object' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
// Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
}) : compose;
const enhancer = composeEnhancers(
applyMiddleware(...middleware),
// other store enhancers if any
);
const store = createStore(reducer, enhancer);
See the post for more details.
1.3 Use redux-devtools-extension package from npm
To make things easier, there's an npm package to install:
npm install --save redux-devtools-extension
and to use like so:
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
const store = createStore(reducer, composeWithDevTools(
applyMiddleware(...middleware),
// other store enhancers if any
));
To specify extension’s options:
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
const composeEnhancers = composeWithDevTools({
// Specify name here, actionsBlacklist, actionsCreators and other options if needed
});
const store = createStore(reducer, /* preloadedState, */ composeEnhancers(
applyMiddleware(...middleware),
// other store enhancers if any
));
There’re just few lines of code added to your bundle.
In case you don't include other enhancers and middlewares, just use devToolsEnhancer:
import { createStore } from 'redux';
import { devToolsEnhancer } from 'redux-devtools-extension';
const store = createStore(reducer, /* preloadedState, */ devToolsEnhancer(
// Specify name here, actionsBlacklist, actionsCreators and other options if needed
));
1.4 Using in production
It's useful to include the extension in production as well. Usually you can use it for development.
If you want to restrict it there, use redux-devtools-extension/logOnlyInProduction:
import { createStore } from 'redux';
import { devToolsEnhancer } from 'redux-devtools-extension/logOnlyInProduction';
const store = createStore(reducer, /* preloadedState, */ devToolsEnhancer(
// options like actionSanitizer, stateSanitizer
));
or with middlewares and enhancers:
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction';
const composeEnhancers = composeWithDevTools({
// options like actionSanitizer, stateSanitizer
});
const store = createStore(reducer, /* preloadedState, */ composeEnhancers(
applyMiddleware(...middleware),
// other store enhancers if any
));
You'll have to add 'process.env.NODE_ENV': JSON.stringify('production') in your Webpack config for the production bundle (to envify). If you use create-react-app, it already does it for you.
If you're already checking process.env.NODE_ENV when creating the store, include redux-devtools-extension/logOnly for production environment.
If you don’t want to allow the extension in production, just use redux-devtools-extension/developmentOnly.
See the article for more details.
1.5 For React Native, hybrid, desktop and server side Redux apps
For React Native we can use react-native-debugger, which already included the same API with Redux DevTools Extension.
For most platforms, include Remote Redux DevTools's store enhancer, and from the extension's context menu choose 'Open Remote DevTools' for remote monitoring.
2. Without Redux
See integrations and the blog post for more details on how to use the extension with any architecture.
Docs
Options (arguments)
Methods (advanced API)
FAQ
Features
Trace actions calls
Troubleshooting
Articles
Videos
Feedback
Demo
Live demos to use the extension with:
Counter
TodoMVC
Redux Form
React Tetris
Book Collection (Angular ngrx store)
Also see ./examples folder.
Backers
Support us with a monthly donation and help us continue our activities. [Become a backer]
Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
Đọc thêm về zalmoxisus/redux-devtools-extension ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/zalmoxisus/redux-devtools-extension là nguồn chính thức.
zalmoxisus/redux-devtools-extension có bao nhiêu sao?
zalmoxisus/redux-devtools-extension có 13.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/zalmoxisus/redux-devtools-extension. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
zalmoxisus/redux-devtools-extension có những chủ đề gì?
GitHub topics của zalmoxisus/redux-devtools-extension: "debug", "devtools", "extension", "javascript", "redux". TopGit xếp repo vào nhóm Frontend.
zalmoxisus/redux-devtools-extension có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho zalmoxisus/redux-devtools-extension. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
zalmoxisus/redux-devtools-extension còn đang phát triển không?
Commit gần nhất trên zalmoxisus/redux-devtools-extension là 2.8 năm trước (theo timestamp GitHub). Repo có 1.0k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
zalmoxisus/redux-devtools-extension dùng license gì?
zalmoxisus/redux-devtools-extension phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
zalmoxisus/redux-devtools-extension viết bằng ngôn ngữ gì?
zalmoxisus/redux-devtools-extension chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
redux-devtools-extension có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về redux-devtools-extension.