Coder Social home page Coder Social logo

Comments (4)

solancer avatar solancer commented on May 23, 2024 5

In case anyone is using redux-toolkit I did, the way worked for me

import { configureStore } from '@reduxjs/toolkit'
import authReducer from '../features/auth/authSlice';
import devToolsEnhancer from 'remote-redux-devtools';

export default configureStore({
    reducer: {
        auth:authReducer,
        searchItems:searchItems,
    },
    devTools: false,
    enhancers: [devToolsEnhancer({ realtime: true, **port**: 8000 })],
})

from remote-redux-devtools.

eric-burel avatar eric-burel commented on May 23, 2024 2

Incredible, it works perfect. I also add to access the "settings" tab in the devtools UI like this:
image

As far as I understand, the "redux" part will create a server for debugging redux, while the cli part launch an electron app that embeds Redux-devtools, and can connect to the server created by the app.

from remote-redux-devtools.

SpaghettiC0des avatar SpaghettiC0des commented on May 23, 2024

In case anyone is using redux-toolkit I did, the way worked for me

import { configureStore } from '@reduxjs/toolkit'
import authReducer from '../features/auth/authSlice';
import devToolsEnhancer from 'remote-redux-devtools';

export default configureStore({
    reducer: {
        auth:authReducer,
        searchItems:searchItems,
    },
    devTools: false,
    enhancers: [devToolsEnhancer({ realtime: true, **port**: 8000 })],
})

It does not seem to work anymore. I'm not getting any logs.

from remote-redux-devtools.

rgomezp avatar rgomezp commented on May 23, 2024

Not working for me. I'm using react native debugger on react native + expo.

This is my package.json:

{
  "name": "MyApp",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "^1.17.10",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/native-stack": "^6.1.0",
    "@reduxjs/toolkit": "^1.8.0",
    "expo": "^47.0.0",
    "expo-asset": "~8.7.0",
    "expo-constants": "~14.0.2",
    "expo-font": "~11.0.1",
    "expo-keep-awake": "~11.0.1",
    "expo-linking": "~3.3.0",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "~0.15.6",
    "expo-web-browser": "~12.0.0",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.5",
    "react-native-chart-kit": "^6.12.0",
    "react-native-elements": "^4.0.0-beta.0",
    "react-native-floating-action": "^1.22.0",
    "react-native-fontawesome": "^7.0.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-svg": "13.4.0",
    "react-native-web": "~0.18.7",
    "react-native-wheely": "^0.6.0",
    "react-redux": "^7.2.6",
    "redux": "^4.1.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@redux-devtools/cli": "^1.0.7",
    "@types/react": "^18.0.25",
    "@types/react-native": "^0.70.6",
    "@types/remote-redux-devtools": "^0.5.5",
    "eslint": "^8.10.0",
    "eslint-plugin-react": "^7.29.3",
    "eslint-plugin-react-hooks": "^4.3.0",
    "jest": "^26.6.3",
    "jest-expo": "~44.0.1",
    "react-test-renderer": "17.0.1",
    "remote-redux-devtools": "^0.5.16",
    "typescript": "~4.3.5"
  },
  "resolutions": {
    "react-devtools-core": "^4.26.1"
  },
}

My store file looks like this:

import { configureStore } from "@reduxjs/toolkit";
import { compose } from 'redux';
import holdingAreaStraightReducer from "./slices/holdingAreaStraight";
import workoutSelectorSelectedExercisesReducer from "./slices/workoutSelectorSelectedExercises";
import devToolsEnhancer from 'remote-redux-devtools';

const store = configureStore({
  reducer: {
    holdingAreaStraight: holdingAreaStraightReducer,
    workoutSelectorSelectedExercises: workoutSelectorSelectedExercisesReducer,
  },
  enhancers: [devToolsEnhancer({
    realtime: true,
  })],
});

export function subscribeListener(listener: () => void): () => void {
  return store.subscribe(listener);
}

export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch;

export default store;

from remote-redux-devtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.