Feature for render callback of stack screen #32
Conversation
|
This introduce a cost for the binding and a door to bugs. |
|
But with that both children and component can be None or both of them can be provided, which would lead to app crash. |
|
react navigation really trigger a crash if you forget component or children? |
|
If I am correct this error happen on first launch, when the routing is being processed right? Isn't it acceptable to have this "runtime error" with zero cost bindings? |
|
I am thinking about another zero cost solution: implement 2 components Screen (component) & ScreenWithCallback (render prop) |
|
Implemented two components Screen and ScreenWithCallback. |
| "route": route, | ||
| }), | ||
| ), | ||
| children: option(renderCallbackProp => React.element), |
a-c-sreedhar-reddy
Jun 11, 2020
•
Author
Contributor
https://github.com/reason-react-native/reason-react-navigation/blob/master/src/Stack.re#L288
But argument of Screen function here can be only of one type right?
|
I'm really interested on this change! |
|
@Freddy03h Would make sense indeed. @a-c-sreedhar-reddy can you handle this? |
|
@a-c-sreedhar-reddy up about the request :) Do you want us to handle it if you don't have time? |
|
Yes @MoOx . |
|
@Freddy03h would you like to handle that in another PR? |
|
Ok I'll try to duplicate the changes on the tabs navigators |
|
Thanks! |


Closes #31