Skip to content

Commit

Permalink
update @lume/element. **BREAKING:** There may be type errors in JSX i…
Browse files Browse the repository at this point in the history
…f you previously worked around any limitations, but this is necessary for a better type checking experience in JSX. If help is needed migrating, please reach out on https://lume.community or on Discord!
  • Loading branch information
trusktr committed Oct 10, 2024
1 parent e22d0b1 commit 804db47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function SomeComponent() {
}
```

### With React JSX
### With React/Preact JSX

To get type checking in React JSX templates, import the React JSX types
directly, as they will not be automatic like JSX type for Solid.js. This is
Expand All @@ -130,7 +130,9 @@ global JSX types for non-React users, we do not automatically register them
```tsx
import {useState, useRef, useEffect} from 'react'
import 'code-mirror-el'
import type {} from 'code-mirror-el/src/CodeMirror.react-jsx' // Import types specifically for React
// Import JSX types specifically for React (or Preact with React compat enabled in
// your tsconfig).
import type {} from 'code-mirror-el/src/CodeMirror.react-jsx'

function SomeComponent() {
const [content, setContent] = useState('...')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@lume/element": "^0.13.0",
"@lume/element": "^0.14.0",
"@uiw/codemirror-theme-noctis-lilac": "^4.0.0",
"classy-solid": "^0.3.0",
"codemirror": "^6.0.0",
Expand Down

0 comments on commit 804db47

Please sign in to comment.