Skip to content

Instantly share code, notes, and snippets.

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