Open evbo opened 5 years ago
What you'll have to do here is separate out the external component to take the component returned by createSliderWithTooltip
as a constructor parameter.
class SliderWithTooltip(val component: js.Object) extends ExternalComponent {
type Props = TooltipSliderProps
}
Then, you could wrap a component as
val mySliderWithTooltip = new SliderWithTooltip(Slider.createSliderWithTooltip(MyTooltipComponent))
and use it as a regular component
div(
mySliderWithTooltip(TooltipSliderProps(...))
)
It would be great to have docs on this pattern, since it shows up pretty often, so I'll leave this issue open.
In order to call this function, how can I render the
ReactComponent
it returns?:I am rendering this component like so:
but it returns the error in the console: