Skip to content

Conversation

@nareshbhatia
Copy link
Contributor

Returning a string a component creates the following TypeScript error in the parent component:

Type error: JSX element type 'string | Element' is not a constructor function for JSX elements.
Type 'string' is not assignable to type 'Element | null'. TS2605

Better to return a proper element.

Returning a string a component creates the following TypeScript error in the parent component: > Type error: JSX element type 'string | Element' is not a constructor function for JSX elements. Type 'string' is not assignable to type 'Element | null'. TS2605 Better to return a proper element.
trojanowski and others added 2 commits February 22, 2019 08:30
 Removed unnecessary $ Co-Authored-By: nareshbhatia <naresh.archfirst@gmail.com>
 Remove unnecessary $ Co-Authored-By: nareshbhatia <naresh.archfirst@gmail.com>
@trojanowski trojanowski merged commit 31d4f97 into trojanowski:master Feb 22, 2019
@trojanowski
Copy link
Owner

Thanks @nareshbhatia

@nareshbhatia
Copy link
Contributor Author

Welcome! Sorry about the oversight on $ signs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants