Created
September 29, 2022 01:55
-
-
Save jimkeller/1c0e05d8464f0146f823be24f072517f to your computer and use it in GitHub Desktop.
EmployeeSearchForm using depdendency-injected service
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 EmployeeSearchForm() { | |
const employee_data_client = useEmployeeDataClient(); | |
const loadResults = async(employee_id) => { | |
return await employee_data_client.getResults(employee_id); | |
} | |
/* Below here, the rest of the component; e.g. rendering a form that calls | |
loadResults */ | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment