getting error when I use destructuring assignment to simplify my props
By : Chul Kyoo Kim
Date : September 14 2020, 02:00 PM
Hope that helps I'm working on destructuring on all props in this component. When I store all my props using a variable assignment the code works, but when I store my props in the function parameters I get an error message.Why does this happen? My component along the error message are down below.
Can the props in a destructuring assignment be transformed in place?
By : Brian An Ashley Roar
Date : March 29 2020, 07:55 AM
Hope this helps No, this is not possible. A destructuring assignment does only assign, it does not do arbitrary transformations on the value. (Setters are an exception, but they would only complicate this). I would recommend to write