Skip to content
Advertisement

Export default and multiple child components

I need the following component stucture:

JavaScript

I tried to achieve this as follows:

JavaScript

But this does not seem to work. Can anybody tell me how to export these functions right so that I can use the above structure?

Advertisement

Answer

Thanks to this answer Using dot notation with functional component I found the solution is:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement