Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
1234567891011121314151617181920212223242526272829303132333435363738
  1. # Redux DevTools Extension's helper
  2. [![Join the chat at https://gitter.im/zalmoxisus/redux-devtools-extension](https://badges.gitter.im/zalmoxisus/redux-devtools-extension.svg)](https://gitter.im/zalmoxisus/redux-devtools-extension?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  3. ## Usage
  4. Install:
  5. ```
  6. npm install --save redux-devtools-extension
  7. ```
  8. and use like that:
  9. ```js
  10. import { createStore, applyMiddleware } from 'redux';
  11. import { composeWithDevTools } from 'redux-devtools-extension';
  12. const store = createStore(reducer, composeWithDevTools(
  13. applyMiddleware(...middleware),
  14. // other store enhancers if any
  15. ));
  16. ```
  17. or if needed to apply [extension’s options](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#windowdevtoolsextensionconfig):
  18. ```js
  19. import { createStore, applyMiddleware } from 'redux';
  20. import { composeWithDevTools } from 'redux-devtools-extension';
  21. const composeEnhancers = composeWithDevTools({
  22. // Specify here name, actionsBlacklist, actionsCreators and other options
  23. });
  24. const store = createStore(reducer, composeEnhancers(
  25. applyMiddleware(...middleware),
  26. // other store enhancers if any
  27. ));
  28. ```
  29. There’re just [few lines of code](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/npm-package/index.js). If you don’t want to allow the extension in production, just use ‘redux-devtools-extension/developmentOnly’ instead of ‘redux-devtools-extension’.
  30. ## License
  31. MIT