Skip to content

Add the addListener binding. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 2, 2019
Merged

Add the addListener binding. #9

merged 4 commits into from
Oct 2, 2019

Conversation

Natim
Copy link
Contributor

@Natim Natim commented Sep 30, 2019

r? @MoOx

@MoOx MoOx requested a review from cknitt September 30, 2019 15:46
@Natim
Copy link
Contributor Author

Natim commented Sep 30, 2019 via email

@cknitt
Copy link
Member

cknitt commented Oct 2, 2019

The TypeScript definitions have

export interface NavigationEventPayload {
  type: EventType;
  action: NavigationAction;
  state: NavigationState;
  lastState: NavigationState | null | undefined;
}

So I think it should be NavigationState.t / option(NavigationState.t).

@cknitt
Copy link
Member

cknitt commented Oct 2, 2019

Actually, if it can really be null and not just undefined, we need Js.Nullable.t(NavigationState.t).

@Natim
Copy link
Contributor Author

Natim commented Oct 2, 2019

Thank you for bearing with me while I am starting with ReasonML.

I have the following error:

src/Navigation.re 33:3-21
  
  31 ┆   navigationEventPayload => unit
  32 ┆ ) =>
  33 ┆ EventSubscription.t =
  34 ┆ "addListener";
  35 ┆ 
  
  The module or file EventSubscription can't be found.

but reason-react-native seems to be in bsconfig.json nonetheless any idea how to make it visible?

open ReactNative; fixed it!

Copy link

@gregtap gregtap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- deleted --

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution and for your patience!

@cknitt cknitt merged commit ca51236 into rescript-react-native:master Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants