Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mchudy/react-native-redux-devtools
Reimplementation of Redux devtools inspector for in-app debugging
https://github.com/mchudy/react-native-redux-devtools
react-native redux redux-devtools
Last synced: 24 days ago
JSON representation
Reimplementation of Redux devtools inspector for in-app debugging
- Host: GitHub
- URL: https://github.com/mchudy/react-native-redux-devtools
- Owner: mchudy
- License: mit
- Created: 2018-10-07T15:58:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T23:15:28.000Z (almost 6 years ago)
- Last Synced: 2024-09-22T00:50:55.198Z (about 2 months ago)
- Topics: react-native, redux, redux-devtools
- Language: TypeScript
- Homepage:
- Size: 705 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-redux-devtools
[![npm version](https://badge.fury.io/js/react-native-redux-devtools.svg)](https://badge.fury.io/js/react-native-redux-devtools)
Redux DevTools implementation for React Native based on [redux-devtools-inspector](https://github.com/alexkuz/redux-devtools-inspector).
For now, it's mostly a one-to-one port adjusted for mobile. Some features might be missing but I plan to implement them in the future.
### Installation
```
npm install --save react-native-redux-devtools
```
```
yarn add react-native-redux-devtools
```### Usage
Create store composed with devtools:
```js
import { createStore, compose, applyMiddleware } from 'redux';
import reducer from './reducer';
import { DevTools } from 'react-native-redux-devtools';const enhancer = compose(
applyMiddleware(), // apply middlewares that you are using
DevTools.instrument()
);export const store = createStore(reducer, enhancer);
```Then you can render devtools in your application:
```jsx
import * as React from 'react';
import { View } from 'react-native';
import { DevTools } from 'react-native-redux-devtools';class App extends React.Component {
render() {
return (
{/* Your app content */}
);
}
}
```Remember not to enable devtools in production builds!
More details on how to set up devtools can be found in [redux-devtools documentation](https://github.com/reduxjs/redux-devtools/blob/master/docs/Walkthrough.md).