I am learning redux and I have an issue with react updating the data from the store.

```
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import { configureStore } from "@reduxjs/toolkit";
import App from "./App";

const store = configureStore({
  reducer: counter
});
function counter(state = 0, action) {
  switch (action.type) {
    case "INCREMENT":
      return state + 1;
    case "DECREMENT":
      return state - 1;
    default:
      return state;
  }
  console.log(store.getState());
}

function App() {
  return (
    <div>
      <p>{store.getState()}</p>
      <button onClick={() => store.dispatch({ type: "INCREMENT" })}>
        Increment
      </button>
    </div>
  );
}

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

```

For some reason the `store.getState()` stays the the same despite a visible update in the redux dev tools

[Redux dev tools view](https://i.stack.imgur.com/QDeLQ.png)

Stackblitz: <https://stackblitz.com/edit/react-p8vm7h?file=src/index.js>