Closed a-c-sreedhar-reddy closed 4 years ago
module Screen = {
type componentProps = {navigation};
type renderCallbackProp = {
navigation,
route,
};
[@bs.obj]
external makeProps:
(
~name: string,
~options: optionCallback=?,
~initialParams: M.params=?,
~component: React.component({
.
"navigation": navigation,
"route": route,
})
=?,
~children: renderCallbackProp => React.element=?,
unit
) =>
screenProps(M.params);
let make = stack##"Screen";
};
How can I make sure that either component
or children
is given as props? Both of them should not be undefined
and both of them should not be provided.
Feature request
https://reactnavigation.org/docs/hello-react-navigation#passing-additional-props
Stack component can accept render callback instead of component prop.
eg: