That worked, thank you! I agree, this should be documented. React’s hot reload won’t work if there’s more than one export, so it’s really important to have that interface
This syntax is similar to kwargs in python or destructured args in js, so my first thought was I could write a type out of that. But now I see, that it’s just a different syntax for args and it’s not represented by some dict (like in python) or object (like in js).
Nope, it’s just the syntax for functions with labeled arguments, but if you really want to, you can also define the type of the function beforehand and reuse it for different components.
Don’t forget to mark the discussion as solved if you think it indeed is.