من نمیتونم از context در ری اکت استفاده کنم .و نمی دونم چرا این کدامه و ارور میگیره
فایل context
"Import {createContext} from "./react
export const isContext=createContext
فایل متغیر از context
"import {isContext} from "./contextFill
"import item from "./itemFill
} <=()=const app
}<=()=return
<"isContext.provider value ="wight>
</item>
<isContext.provider/>
{
{
فایل استفاده از context
"import {useContext} from "./react
"import {isContext} from "./contextFill
}<=()=const item
const context =useContext(isContext)
}()return
<h1 style={{color:context}}>
Hello world
<h1/>
{
export default item
من نمی دونم چرا ارور میگیره یه ارور ۱۰ خط میگیره این ارور هستش
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `Massage`. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
لطفا لطفا جواب بدید
اولین نفری باشید که به این پرسش کمک میکند و مسیر حل مشکل را باز میکند.
اولین پاسخ را بنویسیدشاید پاسخ شما همینجا باشد