-
Notifications
You must be signed in to change notification settings - Fork 44
Add "import React from 'react'" statement to tsx files #342
Comments
@hamza0867 I would rather not emit an import for react on all the |
@cristianoc I believe that's all I need to make it work. I just need the |
Ok so I just changed the module resolution in tsconfig so I don't need the change from Thank you so much |
* In TS, emit import react when a react component is exported. Fixes #342 * Docs.
@hamza0867 creating release 3.9.0 now. |
Thank you so much |
@hamza0867 if this is for your attempt to publish TS libraries, would you write a few words on the outstanding blocks you have found? |
@cristianoc Sorry for the late response. I will be setting a repository where I put everything that I found and the main blockers that I encountered ( and still encountering ) |
Hi,
I would love if the generated
.tsx
files would import React so that other libraries could take advantage of the exported types from "@types/react".My specific use case is the integration of the tsx files with the documentation site generator docz, specifically the Props component. Where all it needs is the component definition to generate the documentation for the props of a react component. But it needs React to be imported in the tsx file ( which makes sense to me )
Here is what the docs look like when there is no
import React from "react"
statement in the generated.tsx
files.Here is what the docs look like when there is an import statement of React in the generated
.tsx
files:I think the relevant line of code to change is this one
Thank you so much
The text was updated successfully, but these errors were encountered: