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

Better Documentation, subtle typos and syntactic details #165

Merged
merged 4 commits into from
Feb 22, 2019

Conversation

athanclark
Copy link
Contributor

There is some additional prose I wrote in README that should probably be reviewed to ensure it explains the concept correctly. I've also added an additional detail to the createLeafNode inline documentation.

There are a couple of semicolons I've added to the React.js foreign interface, but nothing invasive.

I've also exposed the fragment ReactClass in React.purs, for people who don't necessarily want a keyed fragment.

There were also a few typos in other parts of the inline documentation, with the troublesome double-tick ``.

@natefaubion
Copy link
Contributor

Note that fragments are available through the toElement instance for Array ReactElement.

src/React.purs Outdated
-- | Create an element from a React class that does not require children.
-- | Create an element from a React class that does not require children. Additionally it can be used
-- | when the children are represented /only/ through the `children` prop - for instance, a `ContextConsumer`
-- | would be turned into a `ReactElement` with `createLeafElement someContext.consumer { children = \x -> ... }`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be :, not =.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops! Thanks

@ethul
Copy link
Contributor

ethul commented Feb 21, 2019

Thanks for these updates. Looks great!

One comment about the clock example. Would it make sense to update the example, and then reference it later, instead of providing it again in the Understanding Children section? Or is your preference to have both for contrast?

@athanclark
Copy link
Contributor Author

I think it would be best to have them both contrast, so people are introduced to the general concept of createElement, before moving on to the more specific use case.

@ethul
Copy link
Contributor

ethul commented Feb 22, 2019

Sounds good. Thanks again

@ethul ethul merged commit 65dc041 into purescript-contrib:master Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants