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
Thought of this in response to new React.warn() and React.error()utilities. Was concerned about warnings from mixing long/short hand property names since it comes up often, but could possibly apply to others.
Trouble is that console.warn is called from the atomic-engine rather than the react package. Unsure exactly how the warn call could be 'caught' in the react code, but maybe there is another approach I'm not thinking of.
contrived example: https://codesandbox.io/s/9y8j4jkkw with error message below has no stack trace information. Imagine if working in a larger codebase, or customizing a dependency that uses styletron.
Styles `{"margin":"20px"}` and `{"marginTop":"10px"}` in object yielding class "ae af ag"
may result in unexpected behavior. Mixing shorthand and longhand properties within the
same style object is unsupported with atomic rendering.
The text was updated successfully, but these errors were encountered:
Alternatively, styletron-react could use try/catch and re-throw errors after calling React.error. But this can't be used for warnings, so making this part of the styletron-engine-atomic API might be better.
Thought of this in response to new
React.warn()
andReact.error()
utilities. Was concerned about warnings from mixing long/short hand property names since it comes up often, but could possibly apply to others.Trouble is that
console.warn
is called from the atomic-engine rather than the react package. Unsure exactly how the warn call could be 'caught' in the react code, but maybe there is another approach I'm not thinking of.contrived example: https://codesandbox.io/s/9y8j4jkkw with error message below has no stack trace information. Imagine if working in a larger codebase, or customizing a dependency that uses styletron.
The text was updated successfully, but these errors were encountered: