An open API service indexing awesome lists of open source software.

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

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/28539

The 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).