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
I was working with <svg> tsx elements today and kept running into an error that made the component unable to render. It ended up that I was using a number instead of a string to set the width and height of a <svg> element. Because svg's width property is a readonly object and its width attribute is a string things just kinda blew up.
@matt-gadd suggested that we implement InstrinsicElements with better typings so we can catch these types of errors.
A type error, or at least a run-time error with a suggestion for the developer on how to fix (i.e. property value is a [typeof value], maybe you want to use a string)
Actual behavior:
The text was updated successfully, but these errors were encountered:
Enhancement
I was working with
<svg>
tsx elements today and kept running into an error that made the component unable to render. It ended up that I was using anumber
instead of astring
to set thewidth
andheight
of a<svg>
element. Because svg'swidth
property is a readonly object and itswidth
attribute is a string things just kinda blew up.@matt-gadd suggested that we implement
InstrinsicElements
with better typings so we can catch these types of errors.Package Version: 7.0.0-alpha.16
Code
Expected behavior:
A type error, or at least a run-time error with a suggestion for the developer on how to fix (i.e. property value is a [typeof value], maybe you want to use a string)
Actual behavior:
The text was updated successfully, but these errors were encountered: