- Dependencies without TypeScript:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @testing-library/dom @types/jest jest-environment-jsdom
With TypeScript (optional):
import { createSlice } from '@reduxjs/toolkit'; | |
export const templateSlice = createSlice({ | |
name: 'name', | |
initialState: { | |
counter: 10 | |
}, | |
reducers: { | |
increment: (state, /* action */ ) => { | |
//! https://react-redux.js.org/tutorials/quick-start |
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @testing-library/dom @types/jest jest-environment-jsdom
With TypeScript (optional):