-
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
Framework: Replace flowRight occurences with compose for HOCs #3907
Conversation
What about |
So I have just learned that |
cc6708e
to
abef381
Compare
That's not entirely true; in many cases we're assuming props to be passed from a previous HoC in the array, which works with |
@aduth if you will take a closer look, you will notice that |
editor/components/inserter/menu.js
Outdated
@@ -365,7 +365,7 @@ const connectComponent = connect( | |||
{ showInsertionPoint, hideInsertionPoint, fetchReusableBlocks } | |||
); | |||
|
|||
export default flow( | |||
export default compose( |
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.
@aduth It might be an issue only here. I will flip the order to be safe.
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.
Order reversed 👍
abef381
to
db4d437
Compare
Description
In #3493 new utility method
compose
was introduced to be used with Higher-Order Components. This PR refactors all occurrences offlowRight
around HOCs to be replaced withcompose
.How Has This Been Tested?
Manually. All tests should still pass, linter should be happy and editor should work without errors.
Types of changes
Refactoring only. No changes in the existing functionalities.
Checklist: