Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
cknitt merged 4 commits into rescript-react-native:master from Chefclub:issue/8/addListener-binding
Oct 2, 2019
Merged

Add the addListener binding. #9

cknitt merged 4 commits into rescript-react-native:master from Chefclub:issue/8/addListener-binding
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
Copy link
Contributor Author

Natim commented Sep 30, 2019 via email
edited
Loading

For the lastState and the state variable do you know what type to set?

Copy link
Member

cknitt commented Oct 2, 2019
edited
Loading

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).

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).

Copy link
Contributor Author

Natim commented Oct 2, 2019
edited
Loading

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
edited
Loading

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

Reviewers

@MoOx MoOx MoOx left review comments

@cknitt cknitt cknitt approved these changes

+1 more reviewer

@gregtap gregtap gregtap left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /