We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was trying to spin up a demo based on the docs and I ran into the following error:
[Nest] 840 - 01/28/2022, 7:53:31 AM ERROR [ExceptionsHandler] Cannot read property 'createElement' of undefined TypeError: Cannot read property 'createElement' of undefined at MyView (/home/ritte/workspaces/liftoffjs2/src/views/index.tsx:9:3)
Here is the code I was using:
// views/index.tsx import React, { ReactElement } from "react"; export interface MyViewProps { name: string; title: string; } const MyView = ({ name, ...props }: MyViewProps): ReactElement => ( <div>Hello {name}</div> ); export default MyView;
I converted to this code, and it resolved the error. Note the import.
import
// views/index.tsx import * as React from "react"; export interface MyViewProps { name: string; title: string; } const MyView = ({ name, ...props }: MyViewProps): React.ReactElement => ( <div>Hello {name}</div> ); export default MyView;
Not sure if there's a change in the React version, or if this is a documentation bug.
The text was updated successfully, but these errors were encountered:
This seems to be an issue with your typescript setup
Sorry, something went wrong.
No branches or pull requests
I was trying to spin up a demo based on the docs and I ran into the following error:
Here is the code I was using:
I converted to this code, and it resolved the error. Note the
import
.Not sure if there's a change in the React version, or if this is a documentation bug.
The text was updated successfully, but these errors were encountered: