Input:
<div>
{
let left = (limit - value->Js.String.length)->Int.toString;
{j|$left characters left|j}->React.string;
}
</div>
Output:
<div>
{let left = (limit - value->Js.String.length)->Int.toString
{j|$left characters left|j}->React.string}
</div>
In my case (using bs-platform 4.0.8), I am getting this thing reformatted
<View style=styles##backgroundImageWrapper>
{
let uri = "/images/header-background.png";
<Image
resizeMode=`contain
style=styles##backgroundImage
source={`URI(Image.(imageURISource(~uri, ())))}
/* SSR workaround https://github.com/necolas/react-native-web/issues/543 */
defaultSource={`URI(Image.(defaultURISource(~uri, ())))}
/>
}
</View>
to
<View style=styles##backgroundImageWrapper>
{let uri = "/images/header-background.png"
<Image
resizeMode=`contain
style=styles##backgroundImage
source={`URI(Image.(imageURISource(~uri, ())))}
/* SSR workaround https://github.com/necolas/react-native-web/issues/543 */
defaultSource={`URI(Image.(defaultURISource(~uri, ())))}
/>}
</View>
And then the new code generate an error
Error: Syntax error: expression after infix operator expected.
Note: the initial snippet was perfectly working with bs-platform 4.0.6
I'm looking into the issue.
@anmonteiro would you mind taking this one?
I came to the following solution, but I'm not sure if this is the right solution

@IwanKaramazow I just tried it locally. That does indeed seem like the right fix here.
is there any progress on this?
@bloodyowl yes, I have the solution locally, will make a PR tomorrow when I'm back at laptop.
Is there a workaround for this before that I can use before we get a bs-platform release that includes the fix?
PR with fix is up at https://github.com/facebook/reason/pull/2319.
Sorry for the delay!
Fantastic, thank you @IwanKaramazow!
Most helpful comment
@bloodyowl yes, I have the solution locally, will make a PR tomorrow when I'm back at laptop.