Skip to content
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

Bindings cookbook #120

Merged
merged 6 commits into from
Oct 16, 2024
Merged

Bindings cookbook #120

merged 6 commits into from
Oct 16, 2024

Conversation

jchavarri
Copy link
Member

@rusty-key suggested to include a "cookbook" section in the bindings page, so that users can grep for common JS patterns and map them to bindings.

This PR adds a cookbook at the end of "Communicate with JavaScript" page, based on https://github.com/yawaramin/bucklescript-bindings-cookbook.

Copy link
Contributor

@schinns schinns left a comment

Choose a reason for hiding this comment

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

This is guide is amazing! Thanks @jchavarri. I made some minor suggestions.

docs/communicate-with-javascript.md Outdated Show resolved Hide resolved
docs/communicate-with-javascript.md Outdated Show resolved Hide resolved
docs/communicate-with-javascript.md Outdated Show resolved Hide resolved
};
```

If you know some value may be `undefined` (but not `null`, see next section),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If you know some value may be `undefined` (but not `null`, see next section),
If you know some value may be `undefined` (but not `null`), see next section,

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this change modifies the meaning. The original meaning was that if the value may be null, then the reader should see next section. After this change that meaning is lost.

Copy link

@maxkorp maxkorp Oct 15, 2023

Choose a reason for hiding this comment

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

The suggested change as it is definitely does change the meaning.

Perhaps

If you know some value may be `undefined` (but not `null`, see the next section for more on `null`), and if you know...

Copy link
Member Author

@jchavarri jchavarri 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 review @schinns! I had a question about one of the suggestions.

};
```

If you know some value may be `undefined` (but not `null`, see next section),
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this change modifies the meaning. The original meaning was that if the value may be null, then the reader should see next section. After this change that meaning is lost.

Copy link
Collaborator

@feihong feihong left a comment

Choose a reason for hiding this comment

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

lgtm

@jchavarri jchavarri merged commit d0247a2 into master Oct 16, 2024
@jchavarri jchavarri deleted the bindings-cookbook branch October 16, 2024 19:07
feihong pushed a commit that referenced this pull request Nov 1, 2024
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