Next.js Discord

Discord Forum

Why the ecmaScript give me this error

Answered
Flemish Giant posted this in #help-forum
Open in Discord
Avatar
Flemish GiantOP
<ContentsContext.Provider
value={{
content: contents,
loading,
getContent: fetchContent,
// addContent,
// updateContent
deleteCard: deleteContent,
}}
>
{children}
</ContentsContext.Provider> make a context to pass the state and its is cloing why i am getting this error Parsing ecmascript source code failed
57 | return (
58 | <ContentsContext.Provider
59 | value={{
| ^^^^^
60 | content: contents,
61 | loading,
62 | getContent: fetchContent,

Expected '>', got 'value'
Answered by joulev
is the file extension .ts or .tsx? if .ts, rename to .tsx
View full answer

2 Replies