Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Text in Course #9

Open
jbntlff opened this issue Aug 30, 2022 · 0 comments
Open

Missing Text in Course #9

jbntlff opened this issue Aug 30, 2022 · 0 comments

Comments

@jbntlff
Copy link

jbntlff commented Aug 30, 2022

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}>

</LocaleContext.Provider>
);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant