Skip to content
New issue

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

Using Head and Link components with TypeScript #2472

Closed
corydeppen opened this issue Jul 5, 2017 · 1 comment
Closed

Using Head and Link components with TypeScript #2472

corydeppen opened this issue Jul 5, 2017 · 1 comment

Comments

@corydeppen
Copy link

The with-typescript example mentions the following about using the Head and Link components with TypeScript:

In tsconfig.json the options jsx="react" compiles JSX syntax into nested React.createElement calls.
This solution doesn't work well with some Next.js features like next/head or next/link.
The workaround is to create JS files that just return the mentioned module and require them from TSX files.

While I have sporadically seen an error using these components, I was wondering if there is/will be an effort to prevent having to write these workarounds in the future. As someone who's evaluating Next.JS at the moment, the TypeScript support seems to be hit or miss and I'm trying to get a sense for whether the plan is to treat it as a first-class citizen within Next.JS going forward.

@timneutkens
Copy link
Member

timneutkens commented Jul 5, 2017

Tracked here: #2391 🙌

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants