Preact - Typescript issues
See original GitHub issueDo you want to request a feature or report a bug?
- I found a bug
- I want to propose a feature
What is the current behavior? Typescript is throwing two issues from code I got from the examples.
If the current behavior is a bug, please provide the steps to reproduce.
<div {...getRootProps({className: style.dragZone})}>
<input {...getInputProps()} />
{
isDragActive ?
<p>Drop the files here ...</p> :
<p>Drag 'n' drop some files here, or click to select files</p>
}
</div>
<aside>
<h4>Files</h4>
<ul>{files}</ul>
</aside>
Please mention other relevant information such as the browser version, Operating System and react-dropzone version.
I am using Preact, but I’m not sure why that would be relevant to the Typescript issues.
"preact-cli": "^3.0.0-rc.7",
"preact": "^10.2.1",
"preact-render-to-string": "^5.1.4",
"preact-router": "^3.2.1",
"react-dropzone": "^10.2.1"
Typescript config
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "h",
"removeComments": true,
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true
},
"exclude": [
"node_modules"
]
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
TypeScript 4.1 + Preact: TypeScript does not pick up JSX. ...
This is Re: #40502 cc @weswigham @DanielRosenwasser Using the new JSX transform and Preact as import source, TypeScript doesn't seem to pick ...
Read more >TypeScript
When you use Preact in a TypeScript-aware editor (like VSCode), you can benefit from the added type information while writing regular JavaScript.
Read more >parcel-preact-typescript-boilerplate
Start using parcel-preact-typescript-boilerplate in your project by running `npm i ... GitHub license npm Downloads GitHub issues ...
Read more >Fixing JSX types between Preact and React Libraries
To summarize, the main issue seems to be that, although Preact is “shipping” a lot of types needed for React compatibility, they aren't ......
Read more >Preact/Typescript: Only allow a specific component as ...
It is not the problem at Preact level. It is a problem with TypeScript itself in regards to how it deals with JSX/TSX....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
up, same problem
Try to update library, just checking my old code, removed “//@ts-ignore” and theres no errors now