This is a very simple package and the code quality is good, also works great after applying a fix.
Problems:
- Sometimes onChange is not executed
- onChange is not executed when entering the page
These are small problems and easy to fix.
Solution:
Change line 19:
const [lastValue, setLastValue] = useState<boolean>(false);
for this:
const [lastValue, setLastValue] = useState<boolean>(null);
Remove line 29:
setLastValue(false);
The package is only 1 file so if the maintainer doesn't fix it anyone can just copy the code into a file with no problems.
This is a very simple package and the code quality is good, also works great after applying a fix.
Problems:
These are small problems and easy to fix.
Solution:
Change line 19:
const [lastValue, setLastValue] = useState<boolean>(false);for this:
const [lastValue, setLastValue] = useState<boolean>(null);Remove line 29:
setLastValue(false);The package is only 1 file so if the maintainer doesn't fix it anyone can just copy the code into a file with no problems.