Skip to content

Instantly share code, notes, and snippets.

@anil-pace
Created August 22, 2020 05:12
Show Gist options
  • Select an option

  • Save anil-pace/e0c215c0d4ca08d3b8c8effc36b0c335 to your computer and use it in GitHub Desktop.

Select an option

Save anil-pace/e0c215c0d4ca08d3b8c8effc36b0c335 to your computer and use it in GitHub Desktop.
function useCustomHooks() {
let userName = "Anil Kumar";
let userDesignation = "Coder";
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