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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Bindings cookbook #120

wants to merge 6 commits into from

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

@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

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

Co-authored-by: schinns <schinn.ben@gmail.com>
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.

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.

None yet

3 participants