import { createSlice } from '@reduxjs/toolkit'; const { reducer, actions } = createSlice({ name: 'session', initialState: { server: null, user: null, socket: null, }, reducers: { updateServer(state, action) { state.server = action.payload; }, updateUser(state, action) { state.user = action.payload; }, updateSocket(state, action) { state.socket = action.payload; }, }, }); export { actions as sessionActions }; export { reducer as sessionReducer };