Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux toolkit store

// store.js

import { configureStore } from '@reduxjs/toolkit'

export const store = configureStore({
  reducer: {},
})


// index.js 

import { store } from './app/store'
import { Provider } from 'react-redux'

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

Source by redux-toolkit.js.org #
 
PREVIOUS NEXT
Tagged: #redux #toolkit #store
ADD COMMENT
Topic
Name
7+2 =