Skip to content

Commit ecfaa47

Browse files
rickyvettermununki
andauthored
Deprecate stringToComponent (rescript-lang#2)
* stringToComponent type that works with ppx * update stale comment and deprecation Co-authored-by: Woonki Moon <woonki.moon@gmail.com>
1 parent d73a620 commit ecfaa47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ReactDOM.res

+3-3
Original file line numberDiff line numberDiff line change
@@ -2129,8 +2129,8 @@ external jsxs: (string, JsxDOM.domProps) => Jsx.element = "jsxs"
21292129
@module("react/jsx-runtime")
21302130
external jsxsKeyed: (string, JsxDOM.domProps, string) => Jsx.element = "jsxs"
21312131

2132-
// As we've removed `ReactDOMRe.createElement`, this enables patterns like
2133-
// React.createElement(ReactDOM.stringToComponent(multiline ? "textarea" : "input"), ...)
2134-
external stringToComponent: string => React.component<JsxDOM.domProps> = "%identity"
2132+
// Currently, not used by JSX ppx
2133+
@deprecated("Please use ReactDOM.createElement instead.")
2134+
external stringToComponent: string => React.component<'a> = "%identity"
21352135

21362136
module Style = ReactDOMStyle

0 commit comments

Comments
 (0)