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
11 | ((Test.createElement ~children:[{ Test.foo = 2 }; { Test.foo = 3 }] ())
^^^^^^^^^^^^^^^^
Error: This expression has type Test.t but an expression was expected of type React.element
The reason is that the PPX compiles the above into:
And React.array expects (correctly) an array of elements as input.
I wonder if the PPX could skip the call to React.array for elements that are produced using custom components (i.e. the upper case ones)? In those cases, the component author has full control, so if they pass an array, we can allow the type inside the array to be anything, really.
The text was updated successfully, but these errors were encountered:
Consider the following component:
An a usage:
This fails with
The reason is that the PPX compiles the above into:
And
React.array
expects (correctly) an array of elements as input.I wonder if the PPX could skip the call to
React.array
for elements that are produced using custom components (i.e. the upper case ones)? In those cases, the component author has full control, so if they pass an array, we can allow the type inside the array to be anything, really.The text was updated successfully, but these errors were encountered: