AlexisTercero55 / react-bootstrap-vite-redux

Web App templete for using React, Redux and Bootstrap all powered by Vite.
https://alexistercero55.github.io/react-bootstrap-vite-redux/
Mozilla Public License 2.0
1 stars 0 forks source link

Store setup | Redux #3

Closed AlexisTercero55 closed 1 year ago

AlexisTercero55 commented 1 year ago

Test runing for a redux store.

Based on configureStore.

AlexisTercero55 commented 1 year ago

Store | Redux

AlexisTercero55 commented 1 year ago

Store setup done by using ReduxToolkit pattern

https://github.com/AlexisTercero55/react-bootstrap-vite-redux/blob/ede5ffaed1fb75065ae7f25535aad5469ad42a01/src/store/store.js#L23

AlexisTercero55 commented 1 year ago

Review comments

Store setup based on Basic Example recomended pattern.

import { configureStore } from '@reduxjs/toolkit'

import rootReducer from './reducers'

const store = configureStore({ reducer: rootReducer })
// The store now has redux-thunk added and the Redux DevTools Extension is turned on

Reducer for Counter App comes from https://github.com/AlexisTercero55/react-bootstrap-vite-redux/blob/ede5ffaed1fb75065ae7f25535aad5469ad42a01/src/features/counterSlice.js#L27