Why the ecmaScript give me this error
Answered
Flemish Giant posted this in #help-forum

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'
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'
2 Replies

@Flemish Giant <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'

is the file extension .ts or .tsx? if .ts, rename to .tsx
Answer

@joulev is the file extension .ts or .tsx? if .ts, rename to .tsx

Flemish GiantOP
Damn
thanks @joulev
