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

Document Melange on website #734

Merged
merged 17 commits into from
Jun 14, 2023
Merged

Document Melange on website #734

merged 17 commits into from
Jun 14, 2023

Conversation

davesnx
Copy link
Member

@davesnx davesnx commented Jun 12, 2023

No description provided.

@davesnx davesnx changed the title Remove BukcleScript 404 link to invalid-field-names Document Melange on website Jun 12, 2023
@davesnx davesnx marked this pull request as ready for review June 13, 2023 07:41
Copy link
Contributor

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

Mostly looks good with some small issues

docs/components.md Outdated Show resolved Hide resolved
@@ -113,7 +113,7 @@ Reason also always opts for the safest form of a given hook as well. So `React.u

## Hand-writing components

You don't need to use the `[@react.component]` declaration to write components. Instead you can write a pair of `foo` and `fooProps` functions such that `type fooProps: 'a => props and foo: props => React.element` and these will always work as React components! This works with your own version of [`[@bs.obj]`](https://bucklescript.github.io/docs/en/object-2#function), [`[bs.deriving abstract]`](https://bucklescript.github.io/docs/en/object#record-mode), or any other function that takes named args and returns a single props structure.
You don't need to use the `[@react.component]` declaration to write components. Instead you can write a pair of `foo` and `fooProps` functions such that `type fooProps: 'a => props and foo: props => React.element` and these will always work as React components! This works with your own version of [`[@bs.obj]`](https://melange.re/v1.0.0/communicate-with-javascript/#using-jst-objects), [`[bs.deriving abstract]`](https://melange.re/v1.0.0/communicate-with-javascript/#convert-records-into-abstract-types), or any other function that takes named args and returns a single props structure.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a problem with your edit, but I don't understand the meaning of "This works with your own version of ...". Why would the reader have their own version of bs.obj and bs.deriving?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point

docs/event.md Outdated Show resolved Hide resolved
docs/event.md Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
docs/intro-example.md Outdated Show resolved Hide resolved
docs/simple.md Outdated Show resolved Hide resolved
docs/event.md Outdated Show resolved Hide resolved
davesnx and others added 9 commits June 14, 2023 09:46
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: Feihong Hsu <feihong.hsu@gmail.com>
Co-authored-by: schinns <schinn.ben@gmail.com>
@davesnx davesnx merged commit 1d74868 into main Jun 14, 2023
@davesnx davesnx deleted the Add-melange-on-documentation branch June 14, 2023 08:43
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.

3 participants