I have simple Paragraph
component set up in a following way
import * as React from 'react';
import {Text} from 'react-native';
const { memo } = React;
/**
* Component
*/
function Paragraph({ children }) {
return (
<Text>
{children}
</Text>
);
}
export default memo(Paragraph);
Whenever I use <Paragraph />
in my application I receive following error from typescript:
JSX element type 'ReactElement | null' is not a constructor function for JSX elements. Type 'ReactElement' is not assignable to type 'Element'.ts(2605)
This happens to a lot of my elements and started happening since I updated to lates typings for react and react-native from definitely typed. I'm unable to pinpoint a change that might be causing this error.