I’m creating a module signature and I would like to make a react component optional. I haven’t found a way yet how to do it? In the example below, I would like to make PageSubtitle optional so if I create a module of the type LibraryType I would not always have to provide it. Does anybody have a solution for this? The rescript docs don’t seem to mention anything about optional modules.
module type LibraryType = {
module PageTitle: {
@react.component
let make: (~title: string) => React.element
}
// This should be optional
module PageSubtitle: {
@react.component
let make: (~subtitle: string) => React.element
}
}