# Error in React Intermediate - playground app

**URL:** <https://forum.codewithmosh.com/t/error-in-react-intermediate-playground-app/29386>\
**Category:** React\
**Created:** [October 22, 2024, 9:30am UTC](https://forum.codewithmosh.com/t/error-in-react-intermediate-playground-app/29386 "2024-10-22T09:30:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lehaiwam](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@lehaiwam](https://forum.codewithmosh.com/u/lehaiwam)\
**Post date:** [October 22, 2024, 9:30am UTC](https://forum.codewithmosh.com/t/error-in-react-intermediate-playground-app/29386/1 "2024-10-22T09:30:35Z")

</div>

I am getting this error in when trying to consolidate the counter state in a useReducer:  
[  
“message”: “Counter’ cannot be used as a JSX component.\n Its type ‘() =\> JSX.Element’ is not a valid JSX element type.\n Type ‘() =\> JSX.Element’ is not assignable to type ‘(props: any, deprecatedLegacyContext?: any) =\> ReactNode’.\n Type ‘Element’ is not assignable to type ‘ReactNode’.\n Property ‘children’ is missing in type ‘Element’ but required in type ‘ReactPortal’.”,

```
]

```

}]
