Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to local server #1620

Open
teddis opened this issue Mar 1, 2024 · 2 comments
Open

Can't connect to local server #1620

teddis opened this issue Mar 1, 2024 · 2 comments

Comments

@teddis
Copy link

teddis commented Mar 1, 2024

I'm noob to RTK, using for React/Nextjs, and have installed Redux DevTools extension in Mac Chrome browser but cannot connect to my localhost:3000 server. I'm using configureStore() which should automatically enable DevTools according to doc. Searching online and can't find any troubleshooting help.

image

I get this error in the console every time I try to connect:

image

@Senninseyi
Copy link

Can you share your code for the store configuration

And also you don't need to connect to custom / local server

@teddis
Copy link
Author

teddis commented Mar 2, 2024

Sure, my /src/store/index.ts:

import { configureStore } from "@reduxjs/toolkit"
import { setupListeners } from '@reduxjs/toolkit/query'
import { customApi } from './apps/api/custom'
import type * as rtk from "@reduxjs/toolkit"

// ** Reducers
import chat from "@wildeye/frontend/src/store/apps/chat"
import user from "@wildeye/frontend/src/store/apps/user"
import email from "@wildeye/frontend/src/store/apps/email"
import invoice from "@wildeye/frontend/src/store/apps/invoice"
import calendar from "@wildeye/frontend/src/store/apps/calendar"
import permissions from "@wildeye/frontend/src/store/apps/permissions"

export const store = configureStore({
  reducer: {
    user,
    chat,
    email,
    invoice,
    calendar,
    permissions,
    [customApi.reducerPath]: customApi.reducer,
  },
  middleware: getDefaultMiddleware =>
    getDefaultMiddleware({
      serializableCheck: false,
    }).concat(customApi.middleware),
})
setupListeners(store.dispatch)

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

If I don't need to connect to my (local) server, how do I initialize/use the extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants