mvsmal / fable-material-ui

Fable bindings for Material-UI https://mvsmal.github.io/fable-material-ui/
MIT License
61 stars 8 forks source link

Support makeStyles (hook-based JSS?) from @material-ui/styles #50

Open cmeeren opened 5 years ago

cmeeren commented 5 years ago

In many samples on the Material-UI docs, e.g. App Bar with a primary search field, one can now choose between JSS using withStyles (HOC) or makeStyles (React hook-based, AFAIK). makeStyles is defined in @material-ui/styles.

It doesn't seem that fable-material-ui supports makeStyles yet. Would it be possible to add support for it? And could this perhaps entirely avoid the problem/workarounds from #4?

mvsmal commented 5 years ago

React hooks are not released yet, React team promised to deliver it in version 16.7, but according to this post, they postponed it till the next release. @material-ui/styles are also in experimental (alpha) stage, so I didn't spend time on them yet.

I am thinking of creating a separate package, as @material-ui does, but not sure yet. Once the APIs are stable and released, I will create bindings for them, for sure. I will try to play around with it sooner, if time allows. Btw, PRs are welcome 😉

cmeeren commented 5 years ago

according to this post, they postponed it till the next release.

Ah, I see. Looking forward to the release and your bindings.

I don't have much time or energy to spare, but I'll definitely consider PRs when I have itches to scratch. 🙂