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
{{ message }}
This repository was archived by the owner on Oct 30, 2025. It is now read-only.
Because Orbit styleprops don't support all CSS properties, we sometimes have to pass an object to the styles property.
<Divstyles={{transition: "all 0.3s linear"}}/>
It might be desireable to store the style object in a variable, to be able to reuse the styles across components:
conststyles={transition: "all 0.3s linear"}return(<><Divstyles={styles}/><Divstyles={styles}/></>);
However, doing so might lead to hard-to-understand bugs, as the object that is passed to the style prop seems to be directly mutated by Orbit, which makes sharing the object potentially dangerous:
conststyles={transition: "all 0.3s linear"}return(<><DivbackgroundColor="red"styles={styles}/><Divstyles={styles}/> // ⚠️ This will have a red background color!!
</>);
Steps to reproduce
See above.
Expected results
Orbit should not mutate objects passed as props directly, as those might be shared between components.