Hello people! I’d like to ask for some feedback on the js calculator I’ve just finished.
I’ve used React and Redux. It has 4 components, the display, the numpad, the operators pad and the presentational one which renders the first three. I’ve used redux to create a store in order to keep track of two states: input and output which are displayed separately in the Display component.
I’d like to know how to reduce the repetition in the reducers code to make my code cleaner, I tried creating functions for cases where both reducers do the same but somehow it doesn’t work. Also, is there anyway to prevent the numbers to overflow the display when the number entered is too high?
Thanks in advance to anyone. Comments and criticism are welcomed.