Reason React Native UI Primatives
npm install styled-functors> Reason React Native UI Primatives
*
*
* (text)
yarn add styled-functors
Then, add styled-functors to your bsconfig.json.
``reason
open BsReactNative;
open StyledFunctors.Primatives;
let make = (_children, ~user: Server.user) => {
...component,
render: _self =>
center>px(2.)} m={
mb(6.)}>
{user.schoolName |> String.uppercase |> str}
,
};
```
Honestly not sure about this API. It was born out of prototyping needs - something where I could manipulate styles inline quickly.
Sure it's verbose, but have you seen styling in Reason?
* https://github.com/Astrocoders/restyled
* http://2ality.com/2018/01/polymorphic-variants-reasonml.html
License
---
Mit