Open shivakumarm125 opened 2 years ago
[x] Bug report [ ] Feature request [x] Support request
During Yarn build we are getting the below error.
'Datetime' cannot be used as a JSX component. Its instance type 'ReactDatetimeClass' is not a valid JSX element.
We are using react-datetime inside the functional component. We are trying to use
react-datetime version = v3.1.1 yarn version = v1.22.5 node version = v14.15.0
Successful yarn build for react-datetime
I actually just ran into this yesterday. We were able to fix it using this solution:
https://stackoverflow.com/questions/71791347/npm-package-cannot-be-used-as-a-jsx-component-type-errors/71828113#71828113
You didn't write what version of React you are using. I have a feeling this is caused by React 18?
I'm Submitting a ...
Steps to Reproduce
During Yarn build we are getting the below error.
'Datetime' cannot be used as a JSX component. Its instance type 'ReactDatetimeClass' is not a valid JSX element.
We are using react-datetime inside the functional component. We are trying to use
react-datetime version = v3.1.1 yarn version = v1.22.5 node version = v14.15.0
Expected Results
Successful yarn build for react-datetime
Actual Results
'Datetime' cannot be used as a JSX component. Its instance type 'ReactDatetimeClass' is not a valid JSX element.
Minimal Reproduction of the Problem
Other Information (e.g. stacktraces, related issues, suggestions how to fix)