'bug in redux template where do I write to fix it?
I have a very small problem, but my OCD can not let it go. if we were to install redux react template with npx (npx create-react-app my-app --template redux) we could find that incrementIfOdd reducer works only for positive numbers.
export const incrementIfOdd = (amount) => (dispatch, getState) => {
const currentValue = selectCount(getState());
if (currentValue % 2 === 1) {
dispatch(incrementByAmount(amount));
}
};
but we could replace (currentValue % 2 === 1) with (currentValue % 2 !== 0) and it would work perfectly.
export const incrementIfOdd = (amount) => (dispatch, getState) => {
const currentValue = selectCount(getState());
if (currentValue % 2 !== 0) {
dispatch(incrementByAmount(amount));
}
};
My question is Where do I raport the Issue? thx Filip
Solution 1:[1]
You can log an issue here:
https://github.com/reduxjs/cra-template-redux
For finding future maintainers of Create React App templates, search in npm for cra-template- + the name... in this case cra-template-redux.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | John Detlefs |
