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

How to integrate REACT #323

Open
anthhub opened this issue Mar 9, 2020 · 1 comment
Open

How to integrate REACT #323

anthhub opened this issue Mar 9, 2020 · 1 comment

Comments

@anthhub
Copy link

anthhub commented Mar 9, 2020

How to integrate REACT; I want it will be great!

@rique-dev
Copy link

Hello my friend! Follow steps:

  • git clone https://github.com/alexjoverm/typescript-library-starter.git <YOUR_LIB_REACT>
  • cd <YOUR_LIB_REACT>
  • npm i react @types/react
  • change file main to tsx ./src/lib.tsx
  • write your component, as below:
import React from 'react'

export const Component = () => <div>foo bar</div>
  • rollup.config.ts in line 13, change ts to tsx
  • tsconfig.json
"compilerOptions": {
   // ...
   "jsx": "react",
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants