Skip to content

Compatibility with redux-toolkit #2

@varemenos

Description

@varemenos

What is the recommended way of using this alongside redux-toolkit?

I just started investigating whether it's easy/possible to integrate this in a new project I'm working on that uses redux-toolkit and I was wondering if you gave it a thought.

I've been trying to get something like this to work but the only way possible is through this:

const helloWorldSlice = createSlice({
  name: 'helloWorld',
  initialState: initialState,
  extraReducers: {
    [fetchDataRoutine.REQUEST](state, action: PayloadAction<any>) {
      console.log(action)
      // do stuff
      return state
    },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions