Skip to content

This repo provides a minimum production to showcase the issue of persisting redux store state after calling "rerender"

Notifications You must be signed in to change notification settings

Agriculture-Intelligence/react-test-library-redux-example

Repository files navigation

Run Project

  • Step 1: Install packages through 'npm install'
  • Step 2: Move into the 'App.test.tsx' in './src/App.test.tsx'
  • Step 3: There is one test case which showcases the issue of redux store persistence after calling "rerender"
  • Step 4: Run 'npm test' to run test case

File Info

  • The file inside of './utils/test-utils.tsx' provides a custom "render" wrapper function to handle redux state and modify "rerender" to handle redux store as well

vite-template-redux

Uses Vite, Vitest, and React Testing Library to create a modern React app compatible with Create React App

npx degit reduxjs/redux-templates/packages/vite-template-redux my-app

Goals

  • Easy migration from Create React App or Vite
  • As beginner friendly as Create React App
  • Optimized performance compared to Create React App
  • Customizable without ejecting

Scripts

  • dev/start - start dev server and open browser
  • build - build for production
  • preview - locally preview production build
  • test - launch test runner

Inspiration

About

This repo provides a minimum production to showcase the issue of persisting redux store state after calling "rerender"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published