Dynamic Component & Props
I'm having a hard time making use of the <Dynamic/> component and passing props to the underlying component.
This is the dynamic component:
Here, it should pass to the underlying component the id and onClick properties
I'm using it like this:
But upon usage and further inspection, it does not pass the properties, no sure why, as documentation shows this example for this:
<Dynamic component={someComponent} someProp="someValue" />.
Any idea of how to make this work?7 Replies
Where do you want these props to be used?
By the button component
should they be on the
<Button> component in TableFilterButton?
you have to accept the props and pass them to the component:
the Dynamic component passes them to TableFilterButton, but you're not using themoh, what a silly mistake
it worked!
nice! :zzz_flushedfroge:
thanks
happy to help