Alert docs & binding adaptions#617
Conversation
|
Thanks for drawing attention to this, but it is (sadly) a bit more complicated. Looking at the source for |
|
Well, are you sure? If you look at the current master on iOS they use |
|
Yes, I tested. |
|
Does this need any update? Should this be in incoming latest 0.60 patch release? |
|
I checked the sources where |
sgny
left a comment
There was a problem hiding this comment.
Sorry no ways around it, this is simply incorrect based on the RN master.
|
I am too dumb then. I guess it is because they merged AlertIOS and Alert? |
|
I didn't intend that to be so heavy handed, my apologies. I think we're miscommunicating. Seems to be mostly my fault because I was thinking of I should have been clearer what I thought was wrong with it ( |
|
So what should I do? I can type prompt as well, but it's not even mentioned in the docs. |
|
So it seems we can merge this and my apologies for not realising you weren't merging |
|
I will update this PR with prompt bindings in a couple of hours when I have the time. |
|
Done. But I did not document the prompt method (as it is the case in the RN docs). |
| [@bs.obj] | ||
| external options: | ||
| (~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => options = | ||
| ""; |
There was a problem hiding this comment.
Perhaps these can be moved to a new section called Types
Something along the lines of an entry for the type and the signature of the constructor:
## `options`
options:
(~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => optionsThere was a problem hiding this comment.
I am not sure what you mean? A separate Module or even File for the options and buttons types and externals? Can you point me to a binding where this is already the case?
| [@bs.obj] | ||
| external button: | ||
| ( | ||
| ~text: string=?, | ||
| ~onPress: unit => unit=?, | ||
| ~style: [@bs.string] [ | `default | `cancel | `destructive]=?, | ||
| unit | ||
| ) => | ||
| button = | ||
| ""; |
There was a problem hiding this comment.
As above, should be moved to a Types section.
|
Thanks, nice use of We can work on the documentation later. |
|
@MoOx can we merge this? I think everything else can also be adapted at a later stage. |
|
I am afk until Monday, I will try to review all the pending pr next week and cut some releases. |
|
@sgny I am preparing the 0.60.x release so we can move forward with a single branch, unless we really need to have separate one |
I wanted to write a blogpost about zero-cost bindings and take RN as an example. I compared the react-native sources to our bindings and found an error - there is no type field (anymore). They also mention the type field in the docs - so I sent them a PR too.
I took this opportunity to write a little documentation about Alert.