Created
May 27, 2022 15:46
-
-
Save frivolta/492c37e3e2b3f5bbcb0114999bb46287 to your computer and use it in GitHub Desktop.
Write better React, compose multiple functional HoCs, Higher-Order Components - compose hoc's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = (props) => { | |
return ( | |
<div className="App"> | |
<h1>A component: {props.title}</h1> | |
<h2>User: {props.customUser.email}</h2> | |
</div> | |
); | |
}; | |
export default compose(withUser, withTitle)(App); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment