-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add additional explanation and details for compose package #13496
Conversation
319be0b
to
48923ab
Compare
packages/compose/README.md
Outdated
@@ -2,6 +2,52 @@ | |||
|
|||
The `compose` package is a collection of handy [Higher Order Components](https://facebook.github.io/react/docs/higher-order-components.html) (HOCs) you can use to wrap your WordPress components and provide some basic features like: state, instance id, pure... | |||
|
|||
|
|||
The **compose** function is an alias to flowRight from Lodash. It comes from functional programming world and allows to compose any number of functions. An example that illustrates it for two functions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be placed under Usage
section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it at the top since it is explaining what compose is, the top section is using examples to illustrate the definition, where the usage area is for specific use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, the most important part is the content added at the end of the day :)
Thanks for updates 👍
Great, thanks for the reviews! |
@mkaz can you address my comments in a follow-up PR? |
A few minor rewording and updates from @chrisvanpatten in #13496
@chrisvanpatten looks like I was too quick for you :-) |
* Update compose documentation A few minor rewording and updates from @chrisvanpatten in #13496 * Update packages/compose/README.md Co-Authored-By: mkaz <marcus@mkaz.com>
* Update compose documentation A few minor rewording and updates from @chrisvanpatten in #13496 * Update packages/compose/README.md Co-Authored-By: mkaz <marcus@mkaz.com>
* Update compose documentation A few minor rewording and updates from @chrisvanpatten in #13496 * Update packages/compose/README.md Co-Authored-By: mkaz <marcus@mkaz.com>
Description
Adds additional information for compose package.
Props to @gziolo for supplying initial write up in ticket.
Fixes #6220
View live on branch here
Types of changes
Documentation.