redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

1.1 BASIC STORE

Open dawidglap opened this issue 3 years ago • 3 comments

createStore is actually deprecated Screenshot 2022-05-03 at 11 17 12

dawidglap avatar May 03 '22 18:05 dawidglap

I think you try import { legacy_createStore as createStore } from 'redux'

jsy135135 avatar Jun 27 '22 01:06 jsy135135

Wouldn't using createStore not be recommended since it's no longer supported by redux?

Wouldn't using createStore not be recommended since it's no longer supported by redux?

jessfeliciano avatar Nov 08 '22 03:11 jessfeliciano

Yeah, the ideal answer here is "just use Redux Toolkit's configureStore API that does this for you automatically":

const store = configureStore({
  reducer: {
    counter: counterReducer
  }
})

// automatically added the Redux DevTools configuration

The example at https://github.com/reduxjs/redux-devtools/tree/main/extension#installation is still valid code, just not how we'd prefer that people set up and use Redux:

  • https://redux.js.org/introduction/why-rtk-is-redux-today

So, the documentation here probably could/should be updated to be more clear.

markerikson avatar Nov 08 '22 04:11 markerikson