Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Last active December 24, 2019 06:51
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 Mayankgupta688/5d0693b8ebe7c35ace60a2fcbd9db732 to your computer and use it in GitHub Desktop.
Save Mayankgupta688/5d0693b8ebe7c35ace60a2fcbd9db732 to your computer and use it in GitHub Desktop.
function useCustomHooks(userName, userDesignation) {
let userName = "User Name: " + userName;
let userDesignation = "User Designation: " + userDesignation;
return [userName, userDesignation];
}
function ApplicationComponent() {
const [name, designation] = useCustomHooks("Mayank", "Trainer");
return (
<div>
<h1>{name}</h1>
<h2>{designation}</h2>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment