- Notifications
You must be signed in to change notification settings - Fork 471
Closed
rescript-lang/syntax
#672Milestone
Description
Consider the following binding (part of rescript-react-native):
@react.component @module("react-native") external make: ( ~animated: bool=?, ~barStyle: @string [ | #default | @as("light-content") #lightContent | @as("dark-content") #darkContent ]=?, ~hidden: bool=?, ~backgroundColor: string=?, ~translucent: bool=?, ~networkActivityIndicatorVisible: bool=?, ~showHideTransition: showHideTransition=?, ) => React.element = "StatusBar"Now <StatusBar barStyle=#darkContent /> gives the following output with JSX v3:
React.createElement(ReactNative.StatusBar, { barStyle: "dark-content" });but with JSX v4 we get
JsxRuntime.jsx(ReactNative.StatusBar, { barStyle: "darkContent" });causing a runtime exception.
The problem is of course not limited to React Native, but will affect any React component using @string (or, similarly, @int) for any of its props.
/cc @mattdamon108 @cristianoc
mununki
Metadata
Metadata
Assignees
Labels
No labels