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
This compiles and probably shouldn't in case someone accidentally adds a style tag and forgets a value for it, causing runtime failure:
div()(
div(style :=/*what if this is a dangerous typo? compiler should catch it!*/
h3(style := js.Dynamic.literal("marginBottom"->20))("no idea!"),
"why this compile?!"
)
)
Ah, style is defined to take a js.Object (so that js.Dynamic.literal can be used), but ReactElement is also a js.Object, so it can be used there instead. The ideal solution would be to change style to take a js.Dictionary, but unfortunately then we lose the literal syntax.
This compiles and probably shouldn't in case someone accidentally adds a style tag and forgets a value for it, causing runtime failure:
Originally reported on gitter: https://gitter.im/shadaj/slinky?at=60c608fad855766185d5a4a2
The text was updated successfully, but these errors were encountered: