Skip to content

Issues with importing when using TypeScript #60

Description

@julianguyen

Using TypeScript and @types/react-document-title.

I'm trying to do import * as DocumentTitle from 'react-document-title'; but in my render() I get
[ts] JSX element type 'DocumentTitle' does not have any construct or call signatures.

I tried import DocumentTitle from 'react-document-title'; and the page won't load properly.

export class Test extends React.Component<{}, {}> {
  render() {
    return (
      <DocumentTitle title="Hey">
        Test
      </DocumentTitle>
    );
  }
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions