Skip to content

Instantly share code, notes, and snippets.

@frivolta
Created May 27, 2022 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frivolta/492c37e3e2b3f5bbcb0114999bb46287 to your computer and use it in GitHub Desktop.
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
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