Question: This is a typescript react question: I am new to typescript and learning in my spare time to get better at it. I am trying
This is a typescript react question:
I am new to typescript and learning in my spare time to get better at it. I am trying to convert javascript code to typescript but getting error(screenshot below). What would be the solution?(Please show if possible)
React javacsript file
Note: function check if mode is dark or not
/////////////////

/////////////
Ts version
////////////

error message:

\}) Spread types may only be created from object types. ts(2698) [Ln9,Col5]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
