Q:

Redux - Trying to add a function to configureStore

I am trying to persist my redux to localStorage, but I don't know how to add it to redux-toolkit's configureStore function. 
Error:

Argument of type '{ reducer: { progress: Reducer; }; persistedState: any; }' is not assignable to parameter of type 'ConfigureStoreOptions<{ progress: number; }, AnyAction>'.
    Object literal may only specify known properties, and 'persistedState' does not exist in type 'ConfigureStoreOptions<{ progress: number; }, AnyAction>'.    

Code:
localStorage.ts
export const loadState = () => {
  try {
    const serializedState = localStorage.getItem("state");
    if (serializedState === null) {
      return undefined;
    }
    return JSON.parse(serializedState);
  } catch (err) {
    return undefined;
  }
};

index.tsx
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import counterSlice from "./store/reducers/counterSlice";
import { configureStore } from "@reduxjs/toolkit";
// import throttle from "lodash.throttle";
import { Provider } from "react-redux";
import { loadState, saveState } from "./store/localStorage";

const reducer = {
  progress: counterSlice
};
const persistedState = loadState();
const store = configureStore({
  reducer,
  persistedState
});

store.subscribe(() => {
  saveState({
    progress: store.getState().progress
  });
});

ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById("root")
);

A:

I'm the creator of Redux Toolkit.  persistedState is not a valid configuration option for configureStore.  The correct field name is preloadedState.  

