https://github.com/arendjr/react-unstable-handler
Showcase for ESLint React rule edge case
https://github.com/arendjr/react-unstable-handler
Last synced: about 2 months ago
JSON representation
Showcase for ESLint React rule edge case
- Host: GitHub
- URL: https://github.com/arendjr/react-unstable-handler
- Owner: arendjr
- Created: 2024-03-11T14:16:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-12T08:44:33.000Z (about 1 year ago)
- Last Synced: 2025-02-05T21:58:15.173Z (4 months ago)
- Language: JavaScript
- Size: 205 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Unstable Handlers
This repo reproduces a soundness error in the ESLint rule for verifying
React exhaustive dependencies. https://github.com/facebook/react/issues/28539The app shows a counter and three buttons: one to increment, one to decrement,
and one to alternate between incrementing and decrementing. The alternate
button is broken, despite no warnings from the ESLint rule.## Usage
* Run `yarn` to install the necessary dependencies.
* Run `yarn start` to run the app.
* Witness the "Alternate" button is broken (it only increments).
* Run `yarn lint` to see if there are ESLint errors (there aren't any unless you make changes).
* Rename `src/App.fixed.js` to `src/App.js` to see the intended behavior (it alternates between incrementing and decrementing).