You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add test project for generic JSX transform
* adapt completion to look up the correct types when using a generic JSX transform
* changelog
* adapt the primitive completions inside of jsx to the generic JSX moe
* remove uneccessary ignore
* update
* update
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
- Relax filter for what local files that come up in from and regular string completion in `@module`. https://github.com/rescript-lang/rescript-vscode/pull/918
20
20
- Make from completion trigger for expr hole so we get a nice experience when completing {from: <com>} in `@module`. https://github.com/rescript-lang/rescript-vscode/pull/918
21
21
- Latest parser for newest syntax features. https://github.com/rescript-lang/rescript-vscode/pull/917
22
+
- Handle completion for DOM/element attributes and attribute values properly when using a generic JSX transform. https://github.com/rescript-lang/rescript-vscode/pull/919
Copy file name to clipboardexpand all lines: analysis/src/CompletionDecorators.ml
+8-1
Original file line number
Diff line number
Diff line change
@@ -164,10 +164,17 @@ Example `@raises(Exn)` or `@raises([E1, E2, E3])` for multiple exceptions.
164
164
165
165
You will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.
166
166
167
-
Note: The `@react.component` decorator requires the react-jsx config to be set in your `bsconfig.json` to enable the required React transformations.
167
+
Note: The `@react.component` decorator requires the `jsx` config to be set in your `rescript.json`/`bsconfig.json` to enable the required React transformations.
168
168
169
169
[Read more andsee examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator).|};
170
170
] );
171
+
( "jsx.component",
172
+
None,
173
+
[
174
+
{|The `@jsx.component` decorator is used to annotate functions that are JSX components used with ReScript's [generic JSX transform](https://rescript-lang.org/docs/manual/latest/jsx#generic-jsx-transform-jsx-beyond-react-experimental).
175
+
176
+
You will need this decorator whenever you want to use a JSX component in ReScript JSX expressions.|};
0 commit comments