Skip to content

Commit

Permalink
docs: update typescript guide with babel plugin (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Jul 18, 2022
1 parent 7f1540f commit 984ee50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,8 @@ If you're using TypeScript, then in order to allow `<style jsx>` tags to be prop
/// <reference types="styled-jsx" />
```

> If you're using babel to transform styled-jsx code with TypeScript, you need to specify `"jsx": "preserve"` in your tsconfig.json to keep the original JSX and let babel parse and transform with styled-jsx babel plugin.
## Credits

- **Pedram Emrouznejad** ([rijs](https://github.com/rijs/fullstack)) suggested attribute selectors over my initial class prefixing idea.
Expand Down

0 comments on commit 984ee50

Please sign in to comment.