rescript-react
rescript-react copied to clipboard
Allowing styles manipulation on ReScript side
Description
My thoughts on these changes are to allow users to manipulate ReactDOM.Style.t within ReScript which is not possible nowadays because ReactDOM.Style.t is an opaque type. These won't break any previous code since make is still being conserved.
Examples
let styles = ReactDOM.Style.make(~background="#fff", ())
let background = ReactDOM.Style.backgroundGet(styles)
// manipulate any style prop as you wish