Created
August 22, 2020 05:12
-
-
Save anil-pace/e0c215c0d4ca08d3b8c8effc36b0c335 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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