react-hooks-course-curriculum
react-hooks-course-curriculum copied to clipboard
Missing Text in Course
Taken from the React Hooks course in the Context API lessons- LocalContext.js will create the "LocaleContext" const - set it as default export - then import it from itself ( import LocaleContext from ./LocalContext) ? It looks like there is missing lines in the text?
// LocaleContext.js import React from "react";
const LocaleContext = React.createContext();
export default LocaleContext; import React from "react"; import LocaleContext from "./LocaleContext";
export default function App() { const [locale, setLocale] = React.useState("en");
return ( <LocaleContext.Provider value={locale}> <Home /> </LocaleContext.Provider> ); }