Relative Content

Tag Archive for reactjstypescript

DropDown with submenu

I’m trying to create a dropdown for users, similar to the one on YouTube, where there is a main menu and submenus. I define it like this:

Generate object access keys from props

I have problems with dynamisation in Typescript. I know that TS works statically. However, there are sometimes situations where I want to access an object dynamically and cannot do this directly via any generics because the values are generated. Perhaps you could help me to understand the whole thing a little better. I have the following example: