Skip to content

Commit 39de4dc

Browse files
authored
Add @react.componentWithProps to MyWeirdComponent test (#7437)
1 parent 90d5daf commit 39de4dc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/tests/src/preserve_jsx_test.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,18 @@ let _external_component_with_children = <QueryClientProvider>
111111
<Preserve_jsx_test$B/>
112112
</QueryClientProvider>;
113113

114-
function make(props) {
114+
function Preserve_jsx_test$MyWeirdComponent(props) {
115115
return <p>
116116
{"foo"}
117117
{props["\\\"MyWeirdProp\""]}
118118
</p>;
119119
}
120120

121121
let MyWeirdComponent = {
122-
make: make
122+
make: Preserve_jsx_test$MyWeirdComponent
123123
};
124124

125-
let _escaped_jsx_prop = <make MyWeirdProp={"bar"}/>;
125+
let _escaped_jsx_prop = <Preserve_jsx_test$MyWeirdComponent MyWeirdProp={"bar"}/>;
126126

127127
export {
128128
React,

tests/tests/src/preserve_jsx_test.res

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ let _external_component_with_children =
159159
module MyWeirdComponent = {
160160
type props = {\"MyWeirdProp": string}
161161

162+
@react.componentWithProps
162163
let make = props =>
163164
<p>
164165
{React.string("foo")}

0 commit comments

Comments
 (0)