Skip to content

Commit

Permalink
updated react wrapper (#1565)
Browse files Browse the repository at this point in the history
- updated @lit-labs/react to latest version with improved type compatibility
- added small preact section to the react docs with link to preact/compat typescript config guide
  • Loading branch information
ajmchambers authored Sep 14, 2023
1 parent c858bc3 commit 3b77c3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions docs/pages/frameworks/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ If you'd rather not use the CDN for assets, you can create a [build task](https:

Now you can start using components!

### Preact

Preact users facing type errors using components may benefit from setting "paths" in their tsconfig.json so that react types will instead resolve to preact/compat as described in [Preact's typescript documentation](https://preactjs.com/guide/v10/typescript/#typescript-preactcompat-configuration).

## Usage

### Importing Components
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"dependencies": {
"@ctrl/tinycolor": "^4.0.1",
"@floating-ui/dom": "^1.2.1",
"@lit-labs/react": "^2.0.1",
"@lit-labs/react": "^2.0.3",
"@shoelace-style/animations": "^1.1.0",
"@shoelace-style/localize": "^3.1.1",
"composed-offset-position": "^0.0.4",
Expand Down

0 comments on commit 3b77c3b

Please sign in to comment.