rescript-react icon indicating copy to clipboard operation
rescript-react copied to clipboard

Allowing styles manipulation on ReScript side

Open diogomqbm opened this issue 4 years ago • 0 comments

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

diogomqbm avatar Apr 24 '21 18:04 diogomqbm