Not working in some jsx component-as-prop case
samchan0221 opened this issue · 1 comments
samchan0221 commented
Reproduce
| = cursor
Actual behaviour:
<MyComponent prop1={()=><Testing/>}|
<MyComponent prop1={()=><Testing/>}>|
Expected behavuour:
<MyComponent prop1={()=><Testing/>}|
<MyComponent prop1={()=><Testing/>}>|</MyComponent>
hbarcelos commented
I can reproduce this as well and I noticed the following:
# Works:
<MyComponent prop1={{}}|
<MyComponent prop1={``}|
# Fails:
<MyComponent prop1={()=>{}}|
<MyComponent prop1={()=>``}|
The observed behavior is the same if there are additional properties after or before prop1
.
So I guess the issue is with the presence of the arrow function syntax in a prop value.