What is createSlice in Redux Toolkit? createSlice is a higher order function that accepts an initial state, an object full of reducer functions and a slice name . It automatically generates action creators and action types that correspond to the reducers and state.