React [Solved] The spread operator(…state) in react throwing error of Unexpected token There are two ways to solve this error and the first solution is very simple. The second solution is to avoid similar errors if any. January 31, 2021babel, redux