Created
September 29, 2022 01:49
-
-
Save jimkeller/cfcddc415dcea4f58512ce8ff12c21ce to your computer and use it in GitHub Desktop.
Wrapping a React component in a custom context provider
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
/** | |
* This file will hold the Menu that lives at the top of the Page, this is all rendered using a React Component... | |
* | |
*/ | |
import React, { useState } from 'react'; | |
import EmployeeSearchForm from './EmployeeSearchForm'; | |
import EmployeeDataProvider from "../services/EmployeeDataProvider"; | |
function Header() { | |
return ( | |
<header> | |
<div className="employee-search"> | |
<EmployeeDataProvider> | |
<EmployeeSearchForm /> | |
</EmployeeDataProvider>)} | |
</div> | |
</header> | |
); | |
} | |
module.exports = Header; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment