Replies: 2 comments 4 replies
-
Hello, I'm closing this out because, while very much like the rtk data model, I've decided to switch back to using react-query & jotai because it's my perception that redux is best suited for traditional spas, and ssr is an afterthought (or not a priority due to limited resources). Thanks again for all the great work on this toolkit and congrats on 2.0!! |
Beta Was this translation helpful? Give feedback.
2 replies
-
THE STORE CODE: /* eslint-disable prettier/prettier */
import { configureStore } from '@reduxjs/toolkit'
import disciplinaReducer from '../features/disciplina/disciplinaSlice'
import turmaReducer from '../features/turma/turmaSlice'
import menubarReducer from '../features/menubar/menubarSlice'
import { turmaApi } from '../features/turma/turmaApi'
import { disciplinaAPI } from "../features/disciplina/disciplinaApi";
import { salaAPI } from "../features/sala/salaAPI";
import { cursoAPI } from "../features/curso/cursoAPI";
import { classeAPI } from "../features/classe/classeAPI";
import { categoriaCursoAPI } from "../features/categoria_curso/categoria_cursoAPI";
import cursoReducer from "../features/curso/cursoSlice";
import salaReducer from "../features/sala/salaSlice";
import classeReducer from "../features/classe/classeSlice";
import { ano_lectivoAPI } from '../features/ano_lectivo/ano_lectivoAPI'
import { paisesAPI } from '../features/paises'
import { provinciasAPI } from '../features/provincias/provincia.API'
import { municipiosAPI } from '../features/municipios'
import { matriculaAPI } from '../features/matricula/matricula.API'
import { inscricaoAPI } from '../features/inscricao/inscricao.API'
import { professorAPI } from '../features/professor/professor.API'
import { utilizadorAPI } from '../features/utilizador/utilizador.API'
import { comportamentoAPI } from '../features/comportamento/comportamento.API'
import { profileAPI } from '../features/profile/profile.API'
export const store = configureStore({
reducer:{
sala: salaReducer,
curso: cursoReducer,
classe: classeReducer,
turma: turmaReducer,
menuBar: menubarReducer,
disciplina: disciplinaReducer,
ano_lectivo: ano_lectivoAPI.reducer,
[ turmaApi.reducerPath ] : turmaApi.reducer,
[ disciplinaAPI.reducerPath ] : disciplinaAPI.reducer,
[ salaAPI.reducerPath ] : salaAPI.reducer,
[ cursoAPI.reducerPath ] : cursoAPI.reducer,
[ classeAPI.reducerPath ] : classeAPI.reducer,
[ categoriaCursoAPI.reducerPath ] : categoriaCursoAPI.reducer,
[ paisesAPI.reducerPath ] : paisesAPI.reducer,
[ provinciasAPI.reducerPath ] : provinciasAPI.reducer,
[ municipiosAPI.reducerPath ] : municipiosAPI.reducer,
[ matriculaAPI.reducerPath ] : matriculaAPI.reducer,
[ inscricaoAPI.reducerPath] : inscricaoAPI.reducer,
[ professorAPI.reducerPath] : professorAPI.reducer,
[ utilizadorAPI.reducerPath] : utilizadorAPI.render,
[ comportamentoAPI.reducerPath] : comportamentoAPI.render,
[ profileAPI.reducerPath] : profileAPI.render
},
middleware: (getDefaultMiddleware)=> getDefaultMiddleware()
.concat([
turmaApi.middleware,
disciplinaAPI.middleware,
salaAPI.middleware,
cursoAPI.middleware,
classeAPI.middleware,
categoriaCursoAPI.middleware,
ano_lectivoAPI.middleware,
paisesAPI.middleware,
provinciasAPI.middleware,
municipiosAPI.middleware,
matriculaAPI.middleware,
inscricaoAPI.middleware,
professorAPI.middleware,
utilizadorAPI.middleware,
comportamentoAPI.middleware,
profileAPI.middleware,
])
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm getting the following console error when I add an RTK Query API to my store:
The api is definitely added to the store (see below) and the query data is successfully showing in "RTK Query" tab in Redux DevTools, and in rendering in the app via data from use the use hook -- i.e., so functional, everything is working.
I'm running Remix, so I set provider serverState for redux state (e.g., user, settings) so I don't get hydration errors. But problem is:
Any ideas? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions