How did I simplify redux code with better readability