Skip to content

Missing Text in Course #9

Open
Open
@jbntlff

Description

@jbntlff

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions