E
E
Elena2022-02-08 12:05:26
redux
Elena, 2022-02-08 12:05:26

How to get the data of an individual state in extraReducers?

const loginSlice = createSlice({
  name: 'login',
  initialState: {
    login: 'myLogin'
  },
  reducers: {}
});


const userSlice = createSlice({
  name: 'user',
  initialState: {
    user: ''
  },
  reducers: {},
  extraReducers: (builder) => {
    builder.addCase(fethcUser.pending, (state) => {
      // Как получить здесь  'myLogin'?
    });
  }
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question