From e262ed14b01cf9c116db55beba7bb4a853f2a49b Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Thu, 14 Sep 2023 11:15:17 -0400 Subject: [PATCH] backport PR 1565 --- cspell.json | 3 +++ docs/pages/frameworks/react.md | 4 ++++ package.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cspell.json b/cspell.json index cac686efd..c4c7f6ffc 100644 --- a/cspell.json +++ b/cspell.json @@ -29,6 +29,7 @@ "colour", "combobox", "Commonmark", + "compat", "Composability", "Consolas", "contenteditable", @@ -89,6 +90,7 @@ "listbox", "listitem", "litelement", + "longform", "lowercasing", "Lucide", "maxlength", @@ -115,6 +117,7 @@ "ParamagicDev", "peta", "petabit", + "Preact", "prismjs", "progressbar", "radiogroup", diff --git a/docs/pages/frameworks/react.md b/docs/pages/frameworks/react.md index eacc7062d..ab0c0da10 100644 --- a/docs/pages/frameworks/react.md +++ b/docs/pages/frameworks/react.md @@ -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 diff --git a/package.json b/package.json index 51bdfb67c..e3f80170b 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,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",