I think the issue was by ths following , The errors imply that JSX syntax wasn't recognized by the compiler. In order for it to be recognized, the file should have .tsx extension, while it currently has .ts extension. jsx compiler option should also be enabled and set to react.
Calling function using spread operators
By : user2396128
Date : March 29 2020, 07:55 AM
like below fixes the issue Is there a way I could shorten this using spread operators so I am not having to call the createtab function over and over. Especially in cases where I have a much bigger and deeper navigation bar? , You can send all the pages in array to createTab